mirror of
https://github.com/outline/outline.git
synced 2026-06-30 19:47:28 +03:00
57 lines
1.2 KiB
JavaScript
57 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.createTable("imports", {
|
|
id: {
|
|
type: Sequelize.UUID,
|
|
allowNull: false,
|
|
primaryKey: true,
|
|
},
|
|
service: {
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
},
|
|
state: {
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
},
|
|
data: {
|
|
type: Sequelize.JSONB,
|
|
allowNull: false,
|
|
},
|
|
pendingTaskCount: {
|
|
type: Sequelize.INTEGER,
|
|
allowNull: false,
|
|
},
|
|
createdById: {
|
|
type: Sequelize.UUID,
|
|
allowNull: false,
|
|
references: {
|
|
model: "users",
|
|
},
|
|
},
|
|
integrationId: {
|
|
type: Sequelize.UUID,
|
|
allowNull: false,
|
|
references: {
|
|
model: "integrations",
|
|
},
|
|
},
|
|
createdAt: {
|
|
type: Sequelize.DATE,
|
|
allowNull: false,
|
|
},
|
|
updatedAt: {
|
|
type: Sequelize.DATE,
|
|
allowNull: false,
|
|
},
|
|
});
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
await queryInterface.dropTable("imports");
|
|
},
|
|
};
|