-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into N8N-5677-refactor-workflows-store
* master: fix(FTP Node): Use filename instead of remote filepath for downloaded binary data (#6170) ci: Fix test database cleanup (no-changelog) (#6188) refactor(core): Delete boilerplate code across migrations (no-changelog) (#5254) refactor(editor): Add infix to Pinia stores (no-changelog) (#6149) ci: Fix linting issues on master (no-changelog) (#6186)
- Loading branch information
Showing
333 changed files
with
1,424 additions
and
2,393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 7 additions & 20 deletions
27
packages/cli/src/databases/migrations/mysqldb/1588157391238-InitialMigration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,45 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
import config from '@/config'; | ||
|
||
export class InitialMigration1588157391238 implements MigrationInterface { | ||
name = 'InitialMigration1588157391238'; | ||
|
||
async up(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = config.getEnv('database.tablePrefix'); | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
export class InitialMigration1588157391238 implements ReversibleMigration { | ||
async up({ queryRunner, tablePrefix }: MigrationContext) { | ||
await queryRunner.query( | ||
'CREATE TABLE IF NOT EXISTS `' + | ||
tablePrefix + | ||
'credentials_entity` (`id` int NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL, `data` text NOT NULL, `type` varchar(32) NOT NULL, `nodesAccess` json NOT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, INDEX `IDX_' + | ||
tablePrefix + | ||
'07fde106c0b471d8cc80a64fc8` (`type`), PRIMARY KEY (`id`)) ENGINE=InnoDB', | ||
undefined, | ||
); | ||
await queryRunner.query( | ||
'CREATE TABLE IF NOT EXISTS `' + | ||
tablePrefix + | ||
'execution_entity` (`id` int NOT NULL AUTO_INCREMENT, `data` text NOT NULL, `finished` tinyint NOT NULL, `mode` varchar(255) NOT NULL, `retryOf` varchar(255) NULL, `retrySuccessId` varchar(255) NULL, `startedAt` datetime NOT NULL, `stoppedAt` datetime NOT NULL, `workflowData` json NOT NULL, `workflowId` varchar(255) NULL, INDEX `IDX_' + | ||
tablePrefix + | ||
'c4d999a5e90784e8caccf5589d` (`workflowId`), PRIMARY KEY (`id`)) ENGINE=InnoDB', | ||
undefined, | ||
); | ||
await queryRunner.query( | ||
'CREATE TABLE IF NOT EXISTS`' + | ||
tablePrefix + | ||
'workflow_entity` (`id` int NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL, `active` tinyint NOT NULL, `nodes` json NOT NULL, `connections` json NOT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `settings` json NULL, `staticData` json NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB', | ||
undefined, | ||
); | ||
} | ||
|
||
async down(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = config.getEnv('database.tablePrefix'); | ||
|
||
await queryRunner.query('DROP TABLE `' + tablePrefix + 'workflow_entity`', undefined); | ||
async down({ queryRunner, tablePrefix }: MigrationContext) { | ||
await queryRunner.query('DROP TABLE `' + tablePrefix + 'workflow_entity`'); | ||
await queryRunner.query( | ||
'DROP INDEX `IDX_' + | ||
tablePrefix + | ||
'c4d999a5e90784e8caccf5589d` ON `' + | ||
tablePrefix + | ||
'execution_entity`', | ||
undefined, | ||
); | ||
await queryRunner.query('DROP TABLE `' + tablePrefix + 'execution_entity`', undefined); | ||
await queryRunner.query('DROP TABLE `' + tablePrefix + 'execution_entity`'); | ||
await queryRunner.query( | ||
'DROP INDEX `IDX_' + | ||
tablePrefix + | ||
'07fde106c0b471d8cc80a64fc8` ON `' + | ||
tablePrefix + | ||
'credentials_entity`', | ||
undefined, | ||
); | ||
await queryRunner.query('DROP TABLE `' + tablePrefix + 'credentials_entity`', undefined); | ||
await queryRunner.query('DROP TABLE `' + tablePrefix + 'credentials_entity`'); | ||
} | ||
} |
15 changes: 4 additions & 11 deletions
15
packages/cli/src/databases/migrations/mysqldb/1592447867632-WebhookModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
import config from '@/config'; | ||
|
||
export class WebhookModel1592447867632 implements MigrationInterface { | ||
name = 'WebhookModel1592447867632'; | ||
|
||
async up(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = config.getEnv('database.tablePrefix'); | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
export class WebhookModel1592447867632 implements ReversibleMigration { | ||
async up({ queryRunner, tablePrefix }: MigrationContext) { | ||
await queryRunner.query( | ||
`CREATE TABLE IF NOT EXISTS ${tablePrefix}webhook_entity (workflowId int NOT NULL, webhookPath varchar(255) NOT NULL, method varchar(255) NOT NULL, node varchar(255) NOT NULL, PRIMARY KEY (webhookPath, method)) ENGINE=InnoDB`, | ||
); | ||
} | ||
|
||
async down(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = config.getEnv('database.tablePrefix'); | ||
async down({ queryRunner, tablePrefix }: MigrationContext) { | ||
await queryRunner.query(`DROP TABLE ${tablePrefix}webhook_entity`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 4 additions & 10 deletions
14
packages/cli/src/databases/migrations/mysqldb/1607431743767-MakeStoppedAtNullable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
import config from '@/config'; | ||
|
||
export class MakeStoppedAtNullable1607431743767 implements MigrationInterface { | ||
async up(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = config.getEnv('database.tablePrefix'); | ||
export class MakeStoppedAtNullable1607431743767 implements ReversibleMigration { | ||
async up({ queryRunner, tablePrefix }: MigrationContext) { | ||
await queryRunner.query( | ||
'ALTER TABLE `' + tablePrefix + 'execution_entity` MODIFY `stoppedAt` datetime', | ||
undefined, | ||
); | ||
} | ||
|
||
async down(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = config.getEnv('database.tablePrefix'); | ||
async down({ queryRunner, tablePrefix }: MigrationContext) { | ||
await queryRunner.query( | ||
'ALTER TABLE `' + tablePrefix + 'execution_entity` MODIFY `stoppedAt` datetime NOT NULL', | ||
undefined, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 4 additions & 11 deletions
15
packages/cli/src/databases/migrations/mysqldb/1615306975123-ChangeDataSize.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 4 additions & 11 deletions
15
packages/cli/src/databases/migrations/mysqldb/1620729500000-ChangeCredentialDataSize.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.