fix: federated spaces in folders + DnD double indicator line
Remove FK constraint on space_folder_members.space_id so federated space IDs (which don't exist in the local spaces table) can be added to folders without silently failing. Add migration to recreate the table for existing databases and explicit cleanup on space deletion. Offset drop indicator lines by 3px into the mb-1.5 gap so adjacent items share one visual position instead of showing two lines. Extract TransferOwnershipModal (~165 lines) to its own file.
This commit is contained in:
@@ -191,7 +191,7 @@ export const spaceFolders = sqliteTable('space_folders', {
|
||||
|
||||
export const spaceFolderMembers = sqliteTable('space_folder_members', {
|
||||
folderId: text('folder_id').notNull().references(() => spaceFolders.id, { onDelete: 'cascade' }),
|
||||
spaceId: text('space_id').notNull().references(() => spaces.id, { onDelete: 'cascade' }),
|
||||
spaceId: text('space_id').notNull(), // No FK — federated space IDs don't exist locally
|
||||
position: integer('position').default(0),
|
||||
}, (table) => ({
|
||||
pk: primaryKey({ columns: [table.folderId, table.spaceId] }),
|
||||
|
||||
Reference in New Issue
Block a user