1 import * as Sequelize from 'sequelize'
3 async function up (utils: {
4 transaction: Sequelize.Transaction
5 queryInterface: Sequelize.QueryInterface
6 sequelize: Sequelize.Sequelize
9 const { transaction } = utils
12 CREATE TABLE IF NOT EXISTS "videoLiveSession" (
14 "startDate" timestamp with time zone NOT NULL,
15 "endDate" timestamp with time zone,
17 "replayVideoId" integer REFERENCES "video" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
18 "liveVideoId" integer REFERENCES "video" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
19 "createdAt" timestamp with time zone NOT NULL,
20 "updatedAt" timestamp with time zone NOT NULL,
24 await utils.sequelize.query(query, { transaction })
28 throw new Error('Not implemented.')