How to change a table with migrations
sanmadjack opened this issue · comments
Matthew Barbour commented
How do we apply a migration that does something like adds a column to a table without having to wipe out the database?
Tobe Osakwe commented
The Schema
class has an alter
method. Any column declared within the closure you pass are executed as ALTER
commands:
https://pub.dartlang.org/documentation/angel_migration/latest/angel_migration/Schema/alter.html
If you find that you are often changing your schemes often, and would like to manually write your migrations, instead of having them automatically generated, replace the @orm
annotation with @Orm(generateMigrations: false)
.