1
0
Fork 0

borgar table

akairo
loicbersier 5 years ago
parent a23e8f60b5
commit fc0bd392c7

@ -0,0 +1,33 @@
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('borgars', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
userID: {
type: Sequelize.BIGINT
},
level: {
type: Sequelize.INTEGER
},
xp: {
type: Sequelize.INTEGER
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('borgars');
}
};

@ -0,0 +1,12 @@
'use strict';
module.exports = (sequelize, DataTypes) => {
const borgar = sequelize.define('borgar', {
userID: DataTypes.BIGINT,
level: DataTypes.INTEGER,
xp: DataTypes.INTEGER
}, {});
borgar.associate = function(models) {
// associations can be defined here
};
return borgar;
};
Loading…
Cancel
Save