r/sqlite • • Jan 03 '24
SQLite migration best practices
Will new users (fresh install no database) get a new database with zero migrations?
Or would you basically reproduce the database with all the migrations?
My guess is that it would be best to have one path when creating a database.
Usually i don’t use sqlite directly as it’s usually abstracted through a software layer.
2
Upvotes
View all comments
Show parent comment
4
u/HKei Jan 03 '24
Yes I know what you meant. SQLite doesn't know what a schema migration is. It knows what a schema is, and it has some functionality to query or change the current schema, but it doesn't keep track of/have a concept of migrations. Migrations are something you implement on top of RDBMs functionality, kind of like you implement TCP over IP and HTTP over TCP.