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_resolution INTEGER NOT NULL DEFAULT 1080,
|
||||||
max_framerate INTEGER NOT NULL DEFAULT 60,
|
max_framerate INTEGER NOT NULL DEFAULT 60,
|
||||||
registration_open INTEGER,
|
registration_open INTEGER,
|
||||||
|
max_upload_size_bytes INTEGER,
|
||||||
updated_at INTEGER NOT NULL DEFAULT 0
|
updated_at INTEGER NOT NULL DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,12 @@ export function runMigrations(db: Database.Database): void {
|
|||||||
{ name: 'duration', type: 'REAL' },
|
{ 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
|
// 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
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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'),
|
||||||
|
maxUploadSizeBytes: integer('max_upload_size_bytes'),
|
||||||
updatedAt: integer('updated_at').notNull(),
|
updatedAt: integer('updated_at').notNull(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -605,6 +605,7 @@ export interface InstanceAdminSettings {
|
|||||||
discoveryEnabled: boolean;
|
discoveryEnabled: boolean;
|
||||||
gifApiKey?: string;
|
gifApiKey?: string;
|
||||||
gifEnabled?: boolean;
|
gifEnabled?: boolean;
|
||||||
|
maxUploadSizeMb: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InstanceStreamingLimits {
|
export interface InstanceStreamingLimits {
|
||||||
|
|||||||
Reference in New Issue
Block a user