Closed tiagolr closed 9 years ago
Currently the best option (which I use myself) is to use the ufront-ufadmin
library. This includes the dbadmin
haxelib, and will display a list of tables and show you any differences between the schema, and let you make those changes to the database tables.
Including UFAdmin is fairly simple, there is an example in the hello world repo: https://github.com/ufront/hello/blob/master/src/app/controller/HomeController.hx#L14
If that's not the solution you are hoping for, at the moment your only other option is manual SQL.
You can follow issue #12 if you want to see the plan for a more full-featured database migration solution, which I'm pretty eager to use myself once I (or someone else!) has time to make it.
Thanks, for now I'm using sqlite DB browser to rename tables or add new columns etc.. In the future i may look into ufront-orm database migration and contribute as it seems very useful.
Hey, soon I'm likely to change the model of my app, for e.g to add a new field to the user profile object.
How do you handle changes to the model when you already have a server and database in production? So far I've been deleting the database and starting fresh creating the tables, is there any way to ease this process in haxe/ufront-orm? Or i should just manually enter the SQL commands?
Thanks.