fix: updateChannelStates invocation sequence as per foreign keys relations.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-06 19:21:28 +05:30
committed by xsahil03x
parent 442b22a007
commit 7e0997838e
14 changed files with 240 additions and 204 deletions
@@ -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>())();