feat(schema): rename canonical_pair_id to federated_id, add group DM columns
Renames dm_channels.canonical_pair_id → federated_id and adds owner_home_user_id, owner_home_instance, deleted_at columns to support federated group DMs. Migration handles upgrade from existing installs (full table rebuild to rename), partial states (ALTER TABLE), and fresh installs (correct DDL from the start). Backfills federated_id for existing 1-on-1 DM channels and owner federation identity for group DMs.
This commit is contained in:
@@ -117,7 +117,10 @@ export const embeds = sqliteTable('embeds', {
|
||||
export const dmChannels = sqliteTable('dm_channels', {
|
||||
id: text('id').primaryKey(),
|
||||
ownerId: text('owner_id'),
|
||||
canonicalPairId: text('canonical_pair_id'),
|
||||
federatedId: text('federated_id'),
|
||||
ownerHomeUserId: text('owner_home_user_id'),
|
||||
ownerHomeInstance: text('owner_home_instance'),
|
||||
deletedAt: integer('deleted_at'),
|
||||
createdAt: integer('created_at').notNull(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user