Add card and character tables
This commit is contained in:
39
migrations/20220417155941-create-character.js
Normal file
39
migrations/20220417155941-create-character.js
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.createTable('Characters', {
|
||||
id: {
|
||||
allowNull: false,
|
||||
autoIncrement: true,
|
||||
primaryKey: true,
|
||||
type: Sequelize.INTEGER
|
||||
},
|
||||
name: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
rarity: {
|
||||
type: Sequelize.INTEGER
|
||||
},
|
||||
description: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
imageURL: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
imageHash: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
createdAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
},
|
||||
updatedAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
}
|
||||
});
|
||||
},
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.dropTable('Characters');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user