22 lines
720 B
TypeScript
22 lines
720 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class UpdateSortColumn1721284172572 implements MigrationInterface {
|
|
name = 'UpdateSortColumn1721284172572';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "term_conditions" ADD "sort_order" integer NOT NULL DEFAULT '0'`,
|
|
);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "faqs" ADD "sort_order" integer NOT NULL DEFAULT '0'`,
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "faqs" DROP COLUMN "sort_order"`);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "term_conditions" DROP COLUMN "sort_order"`,
|
|
);
|
|
}
|
|
}
|