feat: add max_upload_size_bytes column and shared type
This commit is contained in:
@@ -230,6 +230,7 @@ function createTables(db: Database.Database): void {
|
||||
max_resolution INTEGER NOT NULL DEFAULT 1080,
|
||||
max_framerate INTEGER NOT NULL DEFAULT 60,
|
||||
registration_open INTEGER,
|
||||
max_upload_size_bytes INTEGER,
|
||||
updated_at INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
|
||||
@@ -166,6 +166,12 @@ export function runMigrations(db: Database.Database): void {
|
||||
{ name: 'duration', type: 'REAL' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'instance_settings',
|
||||
columns: [
|
||||
{ name: 'max_upload_size_bytes', type: 'INTEGER' }
|
||||
]
|
||||
},
|
||||
// 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
|
||||
];
|
||||
|
||||
@@ -259,6 +259,7 @@ export const instanceSettings = sqliteTable('instance_settings', {
|
||||
registrationOpen: integer('registration_open'), // null = use env var default, 0/1 = explicit
|
||||
gifApiKey: text('gif_api_key'),
|
||||
bitrateMatrixOverrides: text('bitrate_matrix_overrides'),
|
||||
maxUploadSizeBytes: integer('max_upload_size_bytes'),
|
||||
updatedAt: integer('updated_at').notNull(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user