-
Is there a way to force a certain ordering of columns when tables are created? Suppose I have a table like this: class ChatEntries extends Table with MetaColumns {
TextColumn get chatId => text()();
TextColumn get chatText => text()();
IntColumn get readStatus => integer().withDefault(const Constant(0))();
@override
Set<Column<Object>>? get primaryKey => {chatId}
} With a simple mixin like this: mixin MetaColumns on Table {
TextColumn get userId => text()();
DateTimeColumn get created => dateTime()();
} Would it be possible to inform drift code_gen to put the mixin columns at the end? As it is right now, it would put Probably a silly question but wanted to make the developer experience when debugging table data later a bit better. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There's no good way to do this at the moment. You could write a class extending |
Beta Was this translation helpful? Give feedback.
-
Would this work?
|
Beta Was this translation helpful? Give feedback.
Would this work?