Replies: 1 comment
-
We do not plan to provide a feature that allows you to directly apply migrations based on your schema.rs file to your database as it's not possible to unambiguously generate such migrations in the first place. A common example there is: Should a column be removed and a new one be created or should an existing column be renamed if your change a column name in your That all written: That's the answer what will/should be supported in diesel itself, but noone stops you to write your own extension on top of diesel to do whatever you want. After all the |
Beta Was this translation helpful? Give feedback.
-
My application is using an SQLite DB. I want to be able to create it at startup (without the need of diesel-cli) if it doesn't exist.
I found a solution with embed_migrations but i am to create sql files for each table.
What could be useful is to have the ability to create the tables directly from the schema.rs as this file describes all the tables, their fields and the associations.
Beta Was this translation helpful? Give feedback.
All reactions