link creation/deletion

This commit is contained in:
2024-07-30 19:25:23 +05:30
parent a634ea0fb2
commit 971698b318
10 changed files with 317 additions and 30 deletions

View File

@@ -0,0 +1,34 @@
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('playlists', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
playlistID: {
type: Sequelize.STRING
},
playlistName: {
type: Sequelize.STRING
},
userID: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('playlists');
}
};