renameTable method Null safety
Validates and renames a table in schema.
Implementation
void renameTable(String currentTableName, String newName) {
final table = schema!.tableForName(currentTableName);
if (table == null) {
throw SchemaException("Table $currentTableName does not exist.");
}
schema!.renameTable(table, newName);
if (store != null) {
commands.addAll(store!.renameTable(table, newName));
} else {
commands.add("database.renameTable('$currentTableName', '$newName');");
}
}