Add repeat options for scheduled posts
This commit is contained in:
parent
646156344a
commit
2ff65e89fd
7 changed files with 320 additions and 113 deletions
|
@ -0,0 +1,31 @@
|
|||
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
|
||||
|
||||
export class AddRepeatColumnsToScheduledPosts1575230079526 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.addColumns("scheduled_posts", [
|
||||
new TableColumn({
|
||||
name: "repeat_interval",
|
||||
type: "integer",
|
||||
unsigned: true,
|
||||
isNullable: true,
|
||||
}),
|
||||
new TableColumn({
|
||||
name: "repeat_until",
|
||||
type: "datetime",
|
||||
isNullable: true,
|
||||
}),
|
||||
new TableColumn({
|
||||
name: "repeat_times",
|
||||
type: "integer",
|
||||
unsigned: true,
|
||||
isNullable: true,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.dropColumn("scheduled_posts", "repeat_interval");
|
||||
await queryRunner.dropColumn("scheduled_posts", "repeat_until");
|
||||
await queryRunner.dropColumn("scheduled_posts", "repeat_times");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue