feat: add category_overrides table schema and migration

This commit is contained in:
Jannis Braun
2026-03-21 18:20:21 +01:00
parent 90d702338d
commit eb04c4ad30
2 changed files with 33 additions and 0 deletions
+10
View File
@@ -202,6 +202,16 @@ export const channelOverrides = sqliteTable('channel_overrides', {
pk: primaryKey({ columns: [table.channelId, table.targetType, table.targetId] }),
}));
export const categoryOverrides = sqliteTable('category_overrides', {
categoryId: text('category_id').notNull().references(() => channelCategories.id, { onDelete: 'cascade' }),
targetType: text('target_type').notNull(),
targetId: text('target_id').notNull(),
allow: text('allow').notNull().default('0'),
deny: text('deny').notNull().default('0'),
}, (table) => ({
pk: primaryKey({ columns: [table.categoryId, table.targetType, table.targetId] }),
}));
export const readStates = sqliteTable('read_states', {
userId: text('user_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
channelId: text('channel_id').notNull(),