inital commit
This commit is contained in:
43
migrations/20240614065806-create-event.js
Normal file
43
migrations/20240614065806-create-event.js
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.createTable('events', {
|
||||
id: {
|
||||
allowNull: false,
|
||||
autoIncrement: true,
|
||||
primaryKey: true,
|
||||
type: Sequelize.INTEGER
|
||||
},
|
||||
uniqueId: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
eventType: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
name: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
date: {
|
||||
type: Sequelize.DATE
|
||||
},
|
||||
time: {
|
||||
type: Sequelize.TIME
|
||||
},
|
||||
dayOfWeek: {
|
||||
type: Sequelize.INTEGER
|
||||
},
|
||||
createdAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
},
|
||||
updatedAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
}
|
||||
});
|
||||
},
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.dropTable('Events');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user