refactor: finish legacy room cleanup and explicit migration boundary
This commit is contained in:
16
src/db.ts
16
src/db.ts
@@ -142,7 +142,6 @@ import {
|
||||
getRegisteredAgentTypesForJidFromDatabase,
|
||||
getRegisteredGroupFromDatabase,
|
||||
getStoredRoomSettingsFromDatabase,
|
||||
migrateLegacyRoomRegistrationsForTestsInDatabase,
|
||||
setExplicitRoomModeInDatabase,
|
||||
setRegisteredGroupForTestsInDatabase,
|
||||
setStoredRoomOwnerAgentTypeForTestsInDatabase,
|
||||
@@ -678,10 +677,7 @@ export function getRegisteredGroup(
|
||||
return getRegisteredGroupFromDatabase(db, jid, agentType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal Test/migration helper for seeding legacy capability rows.
|
||||
* Runtime code must use assignRoom() so room_settings remains the explicit SSOT.
|
||||
*/
|
||||
/** @internal Test helper for seeding canonical room bindings. */
|
||||
export function _setRegisteredGroupForTests(
|
||||
jid: string,
|
||||
group: RegisteredGroup,
|
||||
@@ -689,16 +685,6 @@ export function _setRegisteredGroupForTests(
|
||||
setRegisteredGroupForTestsInDatabase(db, jid, group);
|
||||
}
|
||||
|
||||
export function _migrateLegacyRoomRegistrationsForTests(): {
|
||||
migratedRooms: number;
|
||||
migratedRoleOverrides: number;
|
||||
} {
|
||||
if (!db) {
|
||||
throw new Error('Database not initialized');
|
||||
}
|
||||
return migrateLegacyRoomRegistrationsForTestsInDatabase(db);
|
||||
}
|
||||
|
||||
export function assignRoom(
|
||||
chatJid: string,
|
||||
input: AssignRoomInput,
|
||||
|
||||
Reference in New Issue
Block a user