mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
🐛 Fix issue with long credential names in MySQL (#1771)
This commit is contained in:
parent
6ffc544888
commit
0867c7bbfe
|
@ -0,0 +1,18 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||||
|
import * as config from '../../../../config';
|
||||||
|
|
||||||
|
export class ChangeCredentialDataSize1620729500000 implements MigrationInterface {
|
||||||
|
name = 'ChangeCredentialDataSize1620729500000';
|
||||||
|
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
const tablePrefix = config.get('database.tablePrefix');
|
||||||
|
|
||||||
|
await queryRunner.query('ALTER TABLE `' + tablePrefix + 'credentials_entity` MODIFY COLUMN `data` MEDIUMTEXT NOT NULL');
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
const tablePrefix = config.get('database.tablePrefix');
|
||||||
|
|
||||||
|
await queryRunner.query('ALTER TABLE `' + tablePrefix + 'credentials_entity` MODIFY COLUMN `data` TEXT NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import { CreateIndexStoppedAt1594902918301 } from './1594902918301-CreateIndexSt
|
||||||
import { AddWebhookId1611149998770 } from './1611149998770-AddWebhookId';
|
import { AddWebhookId1611149998770 } from './1611149998770-AddWebhookId';
|
||||||
import { MakeStoppedAtNullable1607431743767 } from './1607431743767-MakeStoppedAtNullable';
|
import { MakeStoppedAtNullable1607431743767 } from './1607431743767-MakeStoppedAtNullable';
|
||||||
import { ChangeDataSize1615306975123 } from './1615306975123-ChangeDataSize';
|
import { ChangeDataSize1615306975123 } from './1615306975123-ChangeDataSize';
|
||||||
|
import { ChangeCredentialDataSize1620729500000 } from './1620729500000-ChangeCredentialDataSize';
|
||||||
|
|
||||||
export const mysqlMigrations = [
|
export const mysqlMigrations = [
|
||||||
InitialMigration1588157391238,
|
InitialMigration1588157391238,
|
||||||
|
@ -12,4 +13,5 @@ export const mysqlMigrations = [
|
||||||
AddWebhookId1611149998770,
|
AddWebhookId1611149998770,
|
||||||
MakeStoppedAtNullable1607431743767,
|
MakeStoppedAtNullable1607431743767,
|
||||||
ChangeDataSize1615306975123,
|
ChangeDataSize1615306975123,
|
||||||
|
ChangeCredentialDataSize1620729500000,
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue