diff --git a/drift_dev/lib/src/writer/tables/table_writer.dart b/drift_dev/lib/src/writer/tables/table_writer.dart index b8bb8215..40466b15 100644 --- a/drift_dev/lib/src/writer/tables/table_writer.dart +++ b/drift_dev/lib/src/writer/tables/table_writer.dart @@ -407,11 +407,9 @@ class TableWriter extends TableOrViewWriter { writeGetColumnsOverride(); buffer ..write('@override\nString get aliasedName => ' - '_alias ?? \'${table.id.name}\';\n') - ..write( - '@override\n String get actualTableName => \'${table.id.name}\';\n') - ..write( - 'static String get actualTableNameStatic => \'${table.id.name}\';\n'); + '_alias ?? actualTableName;\n') + ..write('@override\n String get actualTableName => \$name;\n') + ..write('static const String \$name = \'${table.id.name}\';\n'); _writeValidityCheckMethod(); _writePrimaryKeyOverride();