fix: updateChannelStates invocation sequence as per foreign keys relations.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -39,8 +39,5 @@ class Members extends Table {
|
||||
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {
|
||||
userId,
|
||||
channelCid,
|
||||
};
|
||||
Set<Column> get primaryKey => {userId, channelCid};
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ class Messages extends Table {
|
||||
TextColumn get pinnedByUserId => text().nullable()();
|
||||
|
||||
/// The channel cid of which this message is part of
|
||||
TextColumn get channelCid => text().nullable().customConstraint(
|
||||
'NULLABLE REFERENCES channels(cid) ON DELETE CASCADE')();
|
||||
TextColumn get channelCid =>
|
||||
text().customConstraint('REFERENCES channels(cid) ON DELETE CASCADE')();
|
||||
|
||||
/// A Map of [messageText] translations.
|
||||
TextColumn get i18n => text().nullable().map(MapConverter<String>())();
|
||||
|
||||
Reference in New Issue
Block a user