mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
17 lines
522 B
TypeScript
17 lines
522 B
TypeScript
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
|
|
|
export class CreateCredentialsUserRole1660062385367 implements ReversibleMigration {
|
|
async up({ queryRunner, tablePrefix }: MigrationContext) {
|
|
await queryRunner.query(`
|
|
INSERT IGNORE INTO ${tablePrefix}role (name, scope)
|
|
VALUES ("user", "credential");
|
|
`);
|
|
}
|
|
|
|
async down({ queryRunner, tablePrefix }: MigrationContext) {
|
|
await queryRunner.query(`
|
|
DELETE FROM ${tablePrefix}role WHERE name='user' AND scope='credential';
|
|
`);
|
|
}
|
|
}
|