-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
See #1718 for background context.
As a user building an LB4 application with HasMany BelongsTo or HasOne relation, I want lb4 automigrate to define SQL constraints (foreign key, unique) in such way that referential integrity will be correctly enforced by the database.
Acceptance criteria
- Improve the base SQL connector loopback-connector to include CONSTRAINT definitions when updating tables.
- Find out how to test this functionality in automated way in our connectors. It's important to test both autoupdate (incremental changes to existing schema) and automigrate (creating new tables).
Ensure the new tests are executed as part of connector test suite and that they pass on our CI for the following connectors
- loopback-connector-mysql
- loopback-connector-postgresql
- loopback-connector-mssql
- loopback-connector-oracle
Depending on how much work the following connectors will require, either improve them as part of this story or create follow-up stories:
duyduong112 and mathias22osterhagen22