summary refs log tree commit diff
path: root/src/database/migration/postgres/1760622755598-ApplicationCommands.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/migration/postgres/1760622755598-ApplicationCommands.ts')
-rw-r--r--src/database/migration/postgres/1760622755598-ApplicationCommands.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/database/migration/postgres/1760622755598-ApplicationCommands.ts b/src/database/migration/postgres/1760622755598-ApplicationCommands.ts
new file mode 100644

index 00000000..6d4aebc5 --- /dev/null +++ b/src/database/migration/postgres/1760622755598-ApplicationCommands.ts
@@ -0,0 +1,15 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class ApplicationCommands1760622755598 implements MigrationInterface { + name = "ApplicationCommands1760622755598"; + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query( + `CREATE TABLE "application_commands" ("id" character varying NOT NULL, "type" integer NOT NULL DEFAULT '1', "application_id" character varying NOT NULL, "guild_id" character varying, "name" character varying NOT NULL, "name_localizations" text, "description" character varying NOT NULL, "description_localizations" text, "options" text, "default_member_permissions" character varying, "dm_permission" boolean NOT NULL DEFAULT true, "permissions" text, "nsfw" boolean NOT NULL DEFAULT false, "integration_types" text, "global_popularity_rank" integer NOT NULL DEFAULT '0', "contexts" text, "version" character varying NOT NULL DEFAULT '0', "handler" integer NOT NULL DEFAULT '0', CONSTRAINT "PK_0f73c2f025989c407947e1f75fe" PRIMARY KEY ("id"))`, + ); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`DROP TABLE "application_commands"`); + } +}