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

[pg] Use ALTER TABLE instead of copies #243

Merged
merged 3 commits into from
Apr 18, 2024
Merged

[pg] Use ALTER TABLE instead of copies #243

merged 3 commits into from
Apr 18, 2024

Conversation

Electron100
Copy link
Owner

For the Postgres backend, use the appropriate ALTER TABLE command for changed columns instead of copying and recreating the table.

This makes the generated sql more readable and also makes it easier to be correct with foreign key constraints, since the recreated table does not automatically replace the old one in constraints.

For the Postgres backend, use the appropriate `ALTER TABLE` command
for changed columns instead of copying and recreating the table.

This makes the generated sql more readable and also makes it easier to
be correct with foreign key constraints, since the recreated table does not
automatically replace the old one in constraints.
@Electron100
Copy link
Owner Author

TODO: needs unit tests

@Electron100 Electron100 marked this pull request as ready for review April 17, 2024 01:36
@Electron100 Electron100 merged commit 816bd62 into master Apr 18, 2024
4 checks passed
@Electron100 Electron100 deleted the pg_alter_table branch April 18, 2024 01:53
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.

2 participants