Add card and character tables

This commit is contained in:
2022-04-17 19:38:50 +02:00
parent 0419733925
commit 9f568dbbdb
5 changed files with 153 additions and 1 deletions

View 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');
}
};