mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +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';
|
import { DbConnection } from '../db';
|
||||||
|
|
||||||
export async function up(db: DbConnection): Promise<any> {
|
export async function up(db: DbConnection): Promise<any> {
|
||||||
await db.schema.alterTable('emails', function(table: Knex.CreateTableBuilder) {
|
try {
|
||||||
table.text('key', 'mediumtext').defaultTo('').notNullable();
|
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) {
|
// await db.schema.alterTable('emails', function(table: Knex.CreateTableBuilder) {
|
||||||
// table.unique(['recipient_email', 'key']);
|
// table.unique(['recipient_email', 'key']);
|
||||||
|
Loading…
Reference in New Issue
Block a user