remade DB structure
This commit is contained in:
parent
679f6521e8
commit
f449eb1892
4 changed files with 24 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ module.exports = sequelize.define('hubName', {
|
|||
autoIncrement: true,
|
||||
},
|
||||
hubName: {
|
||||
type: Sequelize.STRING(30),
|
||||
type: Sequelize.STRING(50),
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,4 +9,15 @@ module.exports = sequelize.define('messageLink', {
|
|||
type: Sequelize.STRING(30),
|
||||
primaryKey: true,
|
||||
},
|
||||
channelID: {
|
||||
type: Sequelize.STRING(30),
|
||||
allowNull: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
uniqueKeys: {
|
||||
messageUnique: {
|
||||
fields: ['messageID', 'channelID'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ module.exports = {
|
|||
autoIncrement: true,
|
||||
},
|
||||
hubName: {
|
||||
type: Sequelize.STRING(30),
|
||||
type: Sequelize.STRING(50),
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,8 +8,19 @@ module.exports = {
|
|||
type: Sequelize.STRING(30),
|
||||
primaryKey: true,
|
||||
},
|
||||
channelID: {
|
||||
type: Sequelize.STRING(30),
|
||||
allowNull: false,
|
||||
},
|
||||
createdAt: Sequelize.DATE,
|
||||
updatedAt: Sequelize.DATE,
|
||||
},
|
||||
{
|
||||
uniqueKeys: {
|
||||
messageUnique: {
|
||||
fields: ['messageID', 'channelID'],
|
||||
},
|
||||
},
|
||||
}),
|
||||
down: (queryInterface, Sequelize) => queryInterface.dropTable('messagelinks'),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue