Skip to content

Sqlite db init and migrations #74

Answered by benbjohnson
Algebra8 asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding the wtf/sqlite/migration/ directory, did you create this manually or was it auto-generated? How about the file(s) inside it? If you wanted to add a new migration, would you manually create a new file called 00000001.sql and include the new schema?

Yes, I just manually write the SQL to do migrations. I would just add a new .sql file with the next sequence number.

I would also like to verify with you that I've got the correct idea about how the migrations are being performed. It seems like you create a table called migrations (if it doesn't already exist), extract an embedded .sql file from the migrations directory if it doesn't exist in the migrations table, execute it, and th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Algebra8
Comment options

Answer selected by benbjohnson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants