mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Server: Fix migrations
This commit is contained in:
parent
f518549cfe
commit
a9961ae3ec
@ -2,9 +2,13 @@ import { Knex } from 'knex';
|
||||
import { DbConnection } from '../db';
|
||||
|
||||
export async function up(db: DbConnection): Promise<any> {
|
||||
await db.schema.alterTable('emails', function(table: Knex.CreateTableBuilder) {
|
||||
table.text('key', 'mediumtext').defaultTo('').notNullable();
|
||||
});
|
||||
try {
|
||||
await db.schema.alterTable('emails', function(table: Knex.CreateTableBuilder) {
|
||||
table.text('key', 'mediumtext').defaultTo('').notNullable();
|
||||
});
|
||||
} catch (error) {
|
||||
console.warn('Could not add "emails.key" column', error);
|
||||
}
|
||||
|
||||
// await db.schema.alterTable('emails', function(table: Knex.CreateTableBuilder) {
|
||||
// table.unique(['recipient_email', 'key']);
|
||||
|
Loading…
Reference in New Issue
Block a user