Describe the new feature
When you go to File > Export > Export to SQL file, sqlitebrowser can create an SQL dump file that lets you recreate the database using a series of CREATE TABLE and INSERT statements, etc. There is a small issue with this though, which is that when executing that dump file, sqlitebrowser will throw an error if there are INSERT statements that reference foreign keys on records that haven't been inserted yet.
Let's say I have two tables, candidates and elections. Elections has an id column, and that id is used as a foreign key in candidates as election_id.
When creating a dump file, sqlitebrowser appears to create INSERT statements in alphabetical order of table name, which means that the candidates table will be populated first, before elections. This is where it throws an error, because election_id in candidates references a column in elections that will not yet have been populated.
I can go in and manually re-order the INSERT statements in the dump file, and it will execute fine. I'm wondering though if it's possible for sqlitebrowser to handle this on its own at the export stage.
Does this feature exist in another product or project? Please provide a link
No response
Do you have a screenshot? Please add screenshots to help explain your idea.
No response
Describe the new feature
When you go to File > Export > Export to SQL file, sqlitebrowser can create an SQL dump file that lets you recreate the database using a series of CREATE TABLE and INSERT statements, etc. There is a small issue with this though, which is that when executing that dump file, sqlitebrowser will throw an error if there are INSERT statements that reference foreign keys on records that haven't been inserted yet.
Let's say I have two tables, candidates and elections. Elections has an id column, and that id is used as a foreign key in candidates as election_id.
When creating a dump file, sqlitebrowser appears to create INSERT statements in alphabetical order of table name, which means that the candidates table will be populated first, before elections. This is where it throws an error, because election_id in candidates references a column in elections that will not yet have been populated.
I can go in and manually re-order the INSERT statements in the dump file, and it will execute fine. I'm wondering though if it's possible for sqlitebrowser to handle this on its own at the export stage.
Does this feature exist in another product or project? Please provide a link
No response
Do you have a screenshot? Please add screenshots to help explain your idea.
No response