platform/packages/orm/angel_migration/lib/src/schema.dart
2022-01-02 15:21:17 +08:00

17 lines
479 B
Dart
Executable file

import 'table.dart';
abstract class Schema {
void drop(String tableName, {bool cascade = false});
void dropAll(Iterable<String> tableNames, {bool cascade = false}) {
for (var n in tableNames) {
drop(n, cascade: cascade);
}
}
void create(String tableName, void Function(Table table) callback);
void createIfNotExists(String tableName, void Function(Table table) callback);
void alter(String tableName, void Function(MutableTable table) callback);
}