mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
test: fix migration-generate test suite (#10361)
* test: fix migration-generate test suite WIP Closes: #10360 * fixed mssql test hang; added option to disable process exit; --------- Co-authored-by: Alex Messer <dmzt08@gmail.com>
This commit is contained in:
parent
45e31cc57a
commit
ccb9aff89a
@ -201,7 +201,9 @@ export class MigrationGenerateCommand implements yargs.CommandModule {
|
||||
)} has been generated successfully.`,
|
||||
),
|
||||
)
|
||||
process.exit(0)
|
||||
if (args.exitProcess !== false) {
|
||||
process.exit(0)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
PlatformTools.logCmdErr("Error during migration generation:", err)
|
||||
|
||||
@ -20,7 +20,6 @@ describe("commands - migration generate", () => {
|
||||
let connectionOptions: DataSourceOptions[]
|
||||
let createFileStub: sinon.SinonStub
|
||||
let loadDataSourceStub: sinon.SinonStub
|
||||
let timerStub: sinon.SinonFakeTimers
|
||||
let getConnectionOptionsStub: sinon.SinonStub
|
||||
let migrationGenerateCommand: MigrationGenerateCommand
|
||||
let connectionOptionsReader: ConnectionOptionsReader
|
||||
@ -62,12 +61,9 @@ describe("commands - migration generate", () => {
|
||||
migrationGenerateCommand = new MigrationGenerateCommand()
|
||||
createFileStub = sinon.stub(CommandUtils, "createFile")
|
||||
loadDataSourceStub = sinon.stub(CommandUtils, "loadDataSource")
|
||||
|
||||
timerStub = sinon.useFakeTimers(1610975184784)
|
||||
})
|
||||
|
||||
after(async () => {
|
||||
timerStub.restore()
|
||||
createFileStub.restore()
|
||||
loadDataSourceStub.restore()
|
||||
})
|
||||
@ -91,6 +87,8 @@ describe("commands - migration generate", () => {
|
||||
await migrationGenerateCommand.handler(
|
||||
testHandlerArgs({
|
||||
dataSource: "dummy-path",
|
||||
timestamp: "1610975184784",
|
||||
exitProcess: false,
|
||||
}),
|
||||
)
|
||||
|
||||
@ -98,7 +96,7 @@ describe("commands - migration generate", () => {
|
||||
sinon.assert.calledWith(
|
||||
createFileStub,
|
||||
sinon.match(/test-directory.*test-migration.ts/),
|
||||
sinon.match(resultsTemplates.control),
|
||||
sinon.match(resultsTemplates[connectionOption.type]?.control),
|
||||
)
|
||||
|
||||
getConnectionOptionsStub.restore()
|
||||
@ -124,7 +122,9 @@ describe("commands - migration generate", () => {
|
||||
await migrationGenerateCommand.handler(
|
||||
testHandlerArgs({
|
||||
dataSource: "dummy-path",
|
||||
timestamp: "1610975184784",
|
||||
outputJs: true,
|
||||
exitProcess: false,
|
||||
}),
|
||||
)
|
||||
|
||||
@ -132,7 +132,9 @@ describe("commands - migration generate", () => {
|
||||
sinon.assert.calledWith(
|
||||
createFileStub,
|
||||
sinon.match(/test-directory.*test-migration.js/),
|
||||
sinon.match(resultsTemplates.javascript),
|
||||
sinon.match(
|
||||
resultsTemplates[connectionOption.type]?.javascript,
|
||||
),
|
||||
)
|
||||
|
||||
getConnectionOptionsStub.restore()
|
||||
@ -159,6 +161,7 @@ describe("commands - migration generate", () => {
|
||||
testHandlerArgs({
|
||||
dataSource: "dummy-path",
|
||||
timestamp: "1641163894670",
|
||||
exitProcess: false,
|
||||
}),
|
||||
)
|
||||
|
||||
@ -166,7 +169,7 @@ describe("commands - migration generate", () => {
|
||||
sinon.assert.calledWith(
|
||||
createFileStub,
|
||||
sinon.match("test-directory/1641163894670-test-migration.ts"),
|
||||
sinon.match(resultsTemplates.timestamp),
|
||||
sinon.match(resultsTemplates[connectionOption.type]?.timestamp),
|
||||
)
|
||||
|
||||
getConnectionOptionsStub.restore()
|
||||
|
||||
49
test/functional/commands/templates/generate/cockroachdb.ts
Normal file
49
test/functional/commands/templates/generate/cockroachdb.ts
Normal file
@ -0,0 +1,49 @@
|
||||
export const cockroachdb: Record<string, string> = {
|
||||
control: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1610975184784 implements MigrationInterface {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE SEQUENCE "post_id_seq"\`);
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" INT DEFAULT nextval('"post_id_seq"') NOT NULL, "title" varchar NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
await queryRunner.query(\`DROP SEQUENCE "post_id_seq"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class TestMigration1610975184784 {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE SEQUENCE "post_id_seq"\`);
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" INT DEFAULT nextval('"post_id_seq"') NOT NULL, "title" varchar NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
await queryRunner.query(\`DROP SEQUENCE "post_id_seq"\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1641163894670 implements MigrationInterface {
|
||||
name = 'TestMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE SEQUENCE "post_id_seq"\`);
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" INT DEFAULT nextval('"post_id_seq"') NOT NULL, "title" varchar NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
await queryRunner.query(\`DROP SEQUENCE "post_id_seq"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
}
|
||||
43
test/functional/commands/templates/generate/mssql.ts
Normal file
43
test/functional/commands/templates/generate/mssql.ts
Normal file
@ -0,0 +1,43 @@
|
||||
export const mssql: Record<string, string> = {
|
||||
control: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1610975184784 implements MigrationInterface {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" int NOT NULL IDENTITY(1,1), "title" nvarchar(255) NOT NULL, "createdAt" datetime2 NOT NULL CONSTRAINT "DF_fb91bea2d37140a877b775e6b2a" DEFAULT getdate(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class TestMigration1610975184784 {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" int NOT NULL IDENTITY(1,1), "title" nvarchar(255) NOT NULL, "createdAt" datetime2 NOT NULL CONSTRAINT "DF_fb91bea2d37140a877b775e6b2a" DEFAULT getdate(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1641163894670 implements MigrationInterface {
|
||||
name = 'TestMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" int NOT NULL IDENTITY(1,1), "title" nvarchar(255) NOT NULL, "createdAt" datetime2 NOT NULL CONSTRAINT "DF_fb91bea2d37140a877b775e6b2a" DEFAULT getdate(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
}
|
||||
43
test/functional/commands/templates/generate/mysql.ts
Normal file
43
test/functional/commands/templates/generate/mysql.ts
Normal file
@ -0,0 +1,43 @@
|
||||
export const mysql: Record<string, string> = {
|
||||
control: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1610975184784 implements MigrationInterface {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE \\\`post\\\`\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class TestMigration1610975184784 {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE \\\`post\\\`\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1641163894670 implements MigrationInterface {
|
||||
name = 'TestMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE \\\`post\\\`\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
}
|
||||
43
test/functional/commands/templates/generate/oracle.ts
Normal file
43
test/functional/commands/templates/generate/oracle.ts
Normal file
@ -0,0 +1,43 @@
|
||||
export const oracle: Record<string, string> = {
|
||||
control: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1610975184784 implements MigrationInterface {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" number GENERATED BY DEFAULT AS IDENTITY, "title" varchar2(255) NOT NULL, "createdAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class TestMigration1610975184784 {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" number GENERATED BY DEFAULT AS IDENTITY, "title" varchar2(255) NOT NULL, "createdAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1641163894670 implements MigrationInterface {
|
||||
name = 'TestMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" number GENERATED BY DEFAULT AS IDENTITY, "title" varchar2(255) NOT NULL, "createdAt" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
}
|
||||
43
test/functional/commands/templates/generate/postgres.ts
Normal file
43
test/functional/commands/templates/generate/postgres.ts
Normal file
@ -0,0 +1,43 @@
|
||||
export const postgres: Record<string, string> = {
|
||||
control: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1610975184784 implements MigrationInterface {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" SERIAL NOT NULL, "title" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class TestMigration1610975184784 {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" SERIAL NOT NULL, "title" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1641163894670 implements MigrationInterface {
|
||||
name = 'TestMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" SERIAL NOT NULL, "title" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
}
|
||||
43
test/functional/commands/templates/generate/sqlite.ts
Normal file
43
test/functional/commands/templates/generate/sqlite.ts
Normal file
@ -0,0 +1,43 @@
|
||||
export const sqlite: Record<string, string> = {
|
||||
control: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1610975184784 implements MigrationInterface {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class TestMigration1610975184784 {
|
||||
name = 'TestMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')))\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class TestMigration1641163894670 implements MigrationInterface {
|
||||
name = 'TestMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')))\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE "post"\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
}
|
||||
@ -1,43 +1,17 @@
|
||||
import { mysql } from "./generate/mysql"
|
||||
import { postgres } from "./generate/postgres"
|
||||
import { sqlite } from "./generate/sqlite"
|
||||
import { oracle } from "./generate/oracle"
|
||||
import { cockroachdb } from "./generate/cockroachdb"
|
||||
import { mssql } from "./generate/mssql.js"
|
||||
|
||||
export const resultsTemplates: Record<string, any> = {
|
||||
control: `import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class testMigration1610975184784 implements MigrationInterface {
|
||||
name = 'testMigration1610975184784'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE \\\`post\\\`\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
javascript: `const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||
|
||||
module.exports = class testMigration1610975184784 {
|
||||
name = 'testMigration1610975184784'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(\`DROP TABLE \\\`post\\\`\`);
|
||||
}
|
||||
}`,
|
||||
timestamp: `import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class testMigration1641163894670 implements MigrationInterface {
|
||||
name = 'testMigration1641163894670'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`CREATE TABLE \\\`post\\\` (\\\`id\\\` int NOT NULL AUTO_INCREMENT, \\\`title\\\` varchar(255) NOT NULL, \\\`createdAt\\\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), PRIMARY KEY (\\\`id\\\`)) ENGINE=InnoDB\`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(\`DROP TABLE \\\`post\\\`\`);
|
||||
}
|
||||
|
||||
}`,
|
||||
mysql,
|
||||
mariadb: mysql,
|
||||
mssql,
|
||||
sqlite,
|
||||
"better-sqlite3": sqlite,
|
||||
postgres,
|
||||
oracle,
|
||||
cockroachdb,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user