Files
outline/server/migrations/20180212033504-add-integrations.js
Tom Moor 15b1069bcc chore: Move to Typescript (#2783)
This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously.

closes #1282
2021-11-29 06:40:55 -08:00

67 lines
1.4 KiB
JavaScript

module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable("integrations", {
id: {
type: Sequelize.UUID,
allowNull: false,
primaryKey: true,
},
type: {
type: Sequelize.STRING,
allowNull: true,
},
userId: {
type: Sequelize.UUID,
allowNull: true,
references: {
model: "users",
},
},
teamId: {
type: Sequelize.UUID,
allowNull: true,
references: {
model: "teams",
},
},
serviceId: {
type: Sequelize.STRING,
allowNull: false,
},
collectionId: {
type: Sequelize.UUID,
allowNull: true,
references: {
model: "collections",
},
},
authenticationId: {
type: Sequelize.UUID,
allowNull: false,
references: {
model: "authentications",
},
},
events: {
type: Sequelize.ARRAY(Sequelize.STRING),
allowNull: true,
},
settings: {
type: Sequelize.JSONB,
allowNull: true,
},
createdAt: {
type: Sequelize.DATE,
allowNull: false,
},
updatedAt: {
type: Sequelize.DATE,
allowNull: false,
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable("integrations");
},
};