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

SQLite diff producer creates broken foreign key constraints #95

Open
andrewgregory opened this issue Aug 29, 2017 · 0 comments
Open

SQLite diff producer creates broken foreign key constraints #95

andrewgregory opened this issue Aug 29, 2017 · 0 comments

Comments

@andrewgregory
Copy link
Contributor

Since SQLite doesn't support altering existing columns, sql-translator achieves this by creating a new table with the correct schema and copying the data over. It first copies the data into a temporary table, though. If the table includes a foreign key constraint it cannot be satisfied because the temporary table is in a different SQLite schema. Should sql-translator create the new table in the main database so that foreign keys work or do applications need to disable (or just not enable to begin with) foreign key constraints for sql translator?

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

No branches or pull requests

1 participant