mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2025-12-06 13:44:06 +00:00
35 lines
779 B
TypeScript
35 lines
779 B
TypeScript
"use strict";
|
|
import type { Migration } from "sequelize-cli";
|
|
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");
|
|
},
|
|
} as Migration;
|