renameTable method

Future<void> renameTable(
  1. GeneratedTable<Object, GeneratedTable<Object, dynamic>> table,
  2. String oldName
)

Changes the table name from oldName to the current GeneratedTable.entityName.

After renaming a table in drift or Dart and re-running the generator, you can use renameTable in a migration step to rename the table in existing databases.

Implementation

Future<void> renameTable(GeneratedTable table, String oldName) async {
  await _run(RenameTableStatement(oldName, table));
}