-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for missing foreign key constraint on app import #9661
base: release/database-1.1.1
Are you sure you want to change the base?
Fix for missing foreign key constraint on app import #9661
Conversation
Shaurya Sharma seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Deployment: https://tooljet-pr-9661.onrender.com |
Deployment: https://tooljet-pr-9661.onrender.com |
Deployment: https://tooljet-pr-9661.onrender.com |
@@ -32,7 +32,7 @@ const transformationsByVersion = { | |||
}); | |||
dto.schema = { | |||
columns: transformedColumns, | |||
foreign_keys: [], | |||
foreign_keys: dto.schema.foreign_keys || [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For versions which was released before 2.42.0 will not have foreign_keys right?
Why do we have to add it? 🤔
8b1746e
to
5e2203e
Compare
closes: #9695
Problem:
Importing the app breaks the foreign key constraints in the table.
Fix:
Created foreign keys separately after the creation of tables as keys were not forming due to the sequence of table creation. Had to use a bunch of inner transactions in the process.