spotify-manager/migrations/20240730101615-create-links.js
2025-03-05 12:19:35 -07:00

35 lines
758 B
JavaScript

"use strict";
/** @type {import("sequelize-cli").Migration} */
export default {
up: async function (queryInterface, Sequelize) {
await queryInterface.createTable("links", {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
userID: {
type: Sequelize.STRING
},
from: {
type: Sequelize.STRING
},
to: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: async function (queryInterface, Sequelize) {
await queryInterface.dropTable("links");
}
};