"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 query = `
    CREATE TABLE IF NOT EXISTS "videoChannelSync" (
      "id"   SERIAL,
      "externalChannelUrl" VARCHAR(2000) NOT NULL DEFAULT NULL,
      "videoChannelId" INTEGER NOT NULL REFERENCES "videoChannel" ("id")
        ON DELETE CASCADE
        ON UPDATE CASCADE,
      "state" INTEGER NOT NULL DEFAULT 1,
      "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL,
      "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL,
      "lastSyncAt" TIMESTAMP WITH TIME ZONE,
      PRIMARY KEY ("id")
    );
  `;
        yield utils.sequelize.query(query, { transaction: utils.transaction });
    });
}
exports.up = up;
function down(utils) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        yield utils.queryInterface.dropTable('videoChannelSync', { transaction: utils.transaction });
    });
}
exports.down = down;
//# sourceMappingURL=0730-video-channel-sync.js.map