2019-02-14 17:15:34 +00:00
|
|
|
import 'table.dart';
|
|
|
|
|
|
|
|
abstract class Schema {
|
2021-05-17 15:34:19 +00:00
|
|
|
void drop(String tableName, {bool cascade = false});
|
2019-02-14 17:15:34 +00:00
|
|
|
|
2021-05-17 15:34:19 +00:00
|
|
|
void dropAll(Iterable<String> tableNames, {bool cascade = false}) {
|
2019-02-14 17:15:34 +00:00
|
|
|
tableNames.forEach((n) => drop(n, cascade: cascade));
|
|
|
|
}
|
|
|
|
|
2021-05-17 15:34:19 +00:00
|
|
|
void create(String tableName, void Function(Table table) callback);
|
2019-02-14 17:15:34 +00:00
|
|
|
|
2021-05-17 15:34:19 +00:00
|
|
|
void createIfNotExists(String tableName, void Function(Table table) callback);
|
2019-02-14 17:15:34 +00:00
|
|
|
|
2021-05-17 15:34:19 +00:00
|
|
|
void alter(String tableName, void Function(MutableTable table) callback);
|
2019-02-14 17:15:34 +00:00
|
|
|
}
|