feat: add allow_custom_bitrate column to instance_settings schema and migration

This commit is contained in:
Jannis Braun
2026-03-25 04:05:43 +01:00
parent 35573c9f37
commit f02cb4e52a
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -172,6 +172,12 @@ export function runMigrations(db: Database.Database): void {
{ name: 'max_upload_size_bytes', type: 'INTEGER' } { name: 'max_upload_size_bytes', type: 'INTEGER' }
] ]
}, },
{
name: 'instance_settings',
columns: [
{ name: 'allow_custom_bitrate', type: 'INTEGER NOT NULL DEFAULT 1' }
]
},
// gif_api_key is handled by migrateRenameGifApiKey() — do NOT add it here // gif_api_key is handled by migrateRenameGifApiKey() — do NOT add it here
// or it will race with the tenor_api_key → gif_api_key rename migration // or it will race with the tenor_api_key → gif_api_key rename migration
]; ];
+1
View File
@@ -259,6 +259,7 @@ export const instanceSettings = sqliteTable('instance_settings', {
registrationOpen: integer('registration_open'), // null = use env var default, 0/1 = explicit registrationOpen: integer('registration_open'), // null = use env var default, 0/1 = explicit
gifApiKey: text('gif_api_key'), gifApiKey: text('gif_api_key'),
bitrateMatrixOverrides: text('bitrate_matrix_overrides'), bitrateMatrixOverrides: text('bitrate_matrix_overrides'),
allowCustomBitrate: integer('allow_custom_bitrate').notNull().default(1),
maxUploadSizeBytes: integer('max_upload_size_bytes'), maxUploadSizeBytes: integer('max_upload_size_bytes'),
updatedAt: integer('updated_at').notNull(), updatedAt: integer('updated_at').notNull(),
}); });