furlong 1.0.0-dev%2B4
SQLJocky migration tool.
furlong
SQLJocky migration tool. Will eventually work with SQLJocky2.
Todo
- Alterations
- Model generators
- Command-line executable
- Grinder examples
- More examples
- Use
inflectionpackage for pluralization
Examples
class SongMigration extends Migration {
@override
String get name => "Songs table";
@override
Future create(Migrator migrator) async {
await migrator.create("songs", (TableSchema table) {
table.primaryKey = table.integer("id", autoIncrement: true);
table.string("artist_id");
table.string("title");
table.string("desc").nullable = true;
table.timeStamp("created_at");
table.timeStamp("updated_at");
});
}
@override
Future destroy(Migrator migrator) async {
await migrator.drop(["songs"]);
}
}