forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
652 additions
and
260 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
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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
25 changes: 11 additions & 14 deletions
25
packages/cli/src/controllers/saveRequestLog.controller.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
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/postgresdb/1681134145997-AddUserOTPSecret.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 { getTablePrefix, logMigrationEnd, logMigrationStart } from '@db/utils/migrationHelpers'; | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
export class AddUserOTPSecret1681134145997 implements MigrationInterface { | ||
export class AddUserOTPSecret1681134145997 implements ReversibleMigration { | ||
name = 'AddUserOTPSecret1681134145997'; | ||
|
||
async up(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = getTablePrefix(); | ||
logMigrationStart(this.name); | ||
async up({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "${tablePrefix}user" ADD COLUMN otpsecret varchar`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
|
||
async down(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = getTablePrefix(); | ||
|
||
async down({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "${tablePrefix}user" DROP COLUMN otpsecret`); | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
...s/cli/src/databases/migrations/postgresdb/1689942863739-dropConstraintOnSaveRequestLog.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
export class dropConstraintOnSaveRequestLog1689942863739 implements ReversibleMigration { | ||
name = 'dropConstraintOnSaveRequestLog1689942863739'; | ||
|
||
public async up({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE ${tablePrefix}save_request_log" DROP CONSTRAINT IF EXISTS "FK_9a3caef176a6bd386c9ca3b3799";`, | ||
); | ||
} | ||
|
||
public async down({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query( | ||
` | ||
ALTER TABLE "${tablePrefix}save_request_log" ADD CONSTRAINT "FK_9a3caef176a6bd386c9ca3b3799" FOREIGN KEY ("workflowId") REFERENCES "workflow_entity"("id") ON DELETE NO ACTION ON UPDATE NO action | ||
`, | ||
); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...ges/cli/src/databases/migrations/postgresdb/1694091729096-addConstarinToSvaeRequestLog.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
export class addConstarinToSvaeRequestLog1694091729096 implements ReversibleMigration { | ||
name = 'addConstarinToSvaeRequestLog1694091729096'; | ||
|
||
public async up({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query( | ||
` | ||
ALTER TABLE "${tablePrefix}save_request_log" ADD CONSTRAINT "FK_9a3caef176a6bd386c9ca3b3799" FOREIGN KEY ("workflowId") REFERENCES "workflow_entity"("id") ON DELETE NO ACTION ON UPDATE NO action | ||
`, | ||
); | ||
} | ||
|
||
public async down({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE ${tablePrefix}save_request_log" DROP CONSTRAINT IF EXISTS "FK_9a3caef176a6bd386c9ca3b3799";`, | ||
); | ||
} | ||
} |
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/sqlite/1681134145997-AddUserOTPSecret.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 { getTablePrefix, logMigrationEnd, logMigrationStart } from '@db/utils/migrationHelpers'; | ||
import type { MigrationContext, ReversibleMigration } from '@db/types'; | ||
|
||
export class AddUserOTPSecret1681134145997 implements MigrationInterface { | ||
export class AddUserOTPSecret1681134145997 implements ReversibleMigration { | ||
name = 'AddUserOTPSecret1681134145997'; | ||
|
||
async up(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = getTablePrefix(); | ||
logMigrationStart(this.name); | ||
async up({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "${tablePrefix}user" ADD COLUMN otpsecret varchar`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
|
||
async down(queryRunner: QueryRunner): Promise<void> { | ||
const tablePrefix = getTablePrefix(); | ||
|
||
async down({ queryRunner, tablePrefix }: MigrationContext): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "${tablePrefix}user" DROP COLUMN otpsecret`); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
packages/cli/src/databases/repositories/saveRequestLog.repository.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
Oops, something went wrong.