"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.down = exports.up = void 0;
const tslib_1 = require("tslib");
function up(utils) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        const { transaction } = utils;
        const query = `
  CREATE TABLE IF NOT EXISTS "videoLiveSession" (
    "id" serial,
    "startDate" timestamp with time zone NOT NULL,
    "endDate" timestamp with time zone,
    "error" integer,
    "replayVideoId" integer REFERENCES "video" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
    "liveVideoId" integer REFERENCES "video" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
    "createdAt" timestamp with time zone NOT NULL,
    "updatedAt" timestamp with time zone NOT NULL,
    PRIMARY KEY ("id")
  );
  `;
        yield utils.sequelize.query(query, { transaction });
    });
}
exports.up = up;
function down() {
    throw new Error('Not implemented.');
}
exports.down = down;
//# sourceMappingURL=0710-live-sessions.js.map