mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-14 18:27:44 +02:00
Server: Fixed size of a database field
This commit is contained in:
parent
082c8ffecb
commit
264f36f257
Binary file not shown.
@ -581,7 +581,7 @@ export const databaseSchema: DatabaseTables = {
|
||||
can_share_folder: { type: 'number' },
|
||||
can_share_note: { type: 'number' },
|
||||
max_total_item_size: { type: 'string' },
|
||||
total_item_size: { type: 'number' },
|
||||
total_item_size: { type: 'string' },
|
||||
},
|
||||
};
|
||||
// AUTO-GENERATED-TYPES
|
||||
|
@ -0,0 +1,12 @@
|
||||
import { Knex } from 'knex';
|
||||
import { DbConnection } from '../db';
|
||||
|
||||
export async function up(db: DbConnection): Promise<any> {
|
||||
await db.schema.alterTable('users', function(table: Knex.CreateTableBuilder) {
|
||||
table.dropColumn('total_item_size');
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(_db: DbConnection): Promise<any> {
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
import { Knex } from 'knex';
|
||||
import { DbConnection } from '../db';
|
||||
|
||||
export async function up(db: DbConnection): Promise<any> {
|
||||
await db.schema.alterTable('users', function(table: Knex.CreateTableBuilder) {
|
||||
table.bigInteger('total_item_size').defaultTo(0).notNullable();
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(_db: DbConnection): Promise<any> {
|
||||
|
||||
}
|
@ -52,6 +52,7 @@ const propertyTypes: Record<string, string> = {
|
||||
'users.can_share_note': 'number | null',
|
||||
'users.max_total_item_size': 'number | null',
|
||||
'users.max_item_size': 'number | null',
|
||||
'users.total_item_size': 'number',
|
||||
};
|
||||
|
||||
function insertContentIntoFile(filePath: string, markerOpen: string, markerClose: string, contentToInsert: string): void {
|
||||
|
Loading…
Reference in New Issue
Block a user