Skip to content
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: don't use temporary table name to create foreign key, unique, check constraint with SQLite #9185

Merged
merged 2 commits into from Aug 24, 2022

Conversation

fossamagna
Copy link
Contributor

@fossamagna fossamagna commented Jul 6, 2022

Description of change

In migration steps, finally temporary table name is renamed to original table name. these constraints name should be created from original table name not temporary table name.

Fixes #9176

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #9176
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change - N/A
  • The new commits follow conventions explained in CONTRIBUTING.md

…eck constraint with SQLite

In migration steps, finally temporary table name is renamed to original table name. these constraints name should be created from original table name not temporary table name.

Closes: typeorm#9176
@fossamagna
Copy link
Contributor Author

@AlexMesser can you review it, please?

@AlexMesser AlexMesser merged commit e519910 into typeorm:master Aug 24, 2022
@AlexMesser
Copy link
Collaborator

thank you for contribution!

wirekang pushed a commit to wirekang/typeorm that referenced this pull request Aug 25, 2022
…eck constraint with SQLite (typeorm#9185)

* fix: don't use temporary table name to create foreign key, unique, check constraint with SQLite

In migration steps, finally temporary table name is renamed to original table name. these constraints name should be created from original table name not temporary table name.

Closes: typeorm#9176

* style: remove unnecessary comment
nordinh pushed a commit to nordinh/typeorm that referenced this pull request Aug 29, 2022
…eck constraint with SQLite (typeorm#9185)

* fix: don't use temporary table name to create foreign key, unique, check constraint with SQLite

In migration steps, finally temporary table name is renamed to original table name. these constraints name should be created from original table name not temporary table name.

Closes: typeorm#9176

* style: remove unnecessary comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The names of foreign keys created by queryRunner.createForeignKey and schema:sync are different with SQLite
2 participants