]>
Commit | Line | Data |
---|---|---|
2539932e C |
1 | import * as Sequelize from 'sequelize' |
2 | ||
3 | async function up (utils: { | |
4 | transaction: Sequelize.Transaction | |
5 | queryInterface: Sequelize.QueryInterface | |
6 | sequelize: Sequelize.Sequelize | |
7 | db: any | |
8 | }): Promise<void> { | |
9 | { | |
10 | const query = ` | |
11 | CREATE TABLE IF NOT EXISTS "actorCustomPage" ( | |
12 | "id" serial, | |
13 | "content" TEXT, | |
14 | "type" varchar(255) NOT NULL, | |
15 | "actorId" integer NOT NULL REFERENCES "actor" ("id") ON DELETE CASCADE ON UPDATE CASCADE, | |
16 | "createdAt" timestamp WITH time zone NOT NULL, | |
17 | "updatedAt" timestamp WITH time zone NOT NULL, | |
18 | PRIMARY KEY ("id") | |
19 | ); | |
20 | ` | |
21 | ||
22 | await utils.sequelize.query(query) | |
23 | } | |
24 | } | |
25 | ||
26 | function down (options) { | |
27 | throw new Error('Not implemented.') | |
28 | } | |
29 | ||
30 | export { | |
31 | up, | |
32 | down | |
33 | } |