forked from Supositware/Haha-Yes
Use sql instead of json
parent
d158928bfb
commit
fc74a7e746
@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.createTable('joinChannels', {
|
||||
id: {
|
||||
allowNull: false,
|
||||
autoIncrement: true,
|
||||
primaryKey: true,
|
||||
type: Sequelize.INTEGER
|
||||
},
|
||||
channelID: {
|
||||
type: Sequelize.BIGINT
|
||||
},
|
||||
guildID: {
|
||||
type: Sequelize.BIGINT
|
||||
},
|
||||
message: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
createdAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
},
|
||||
updatedAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
}
|
||||
});
|
||||
},
|
||||
down: (queryInterface, Sequelize) => {
|
||||
return queryInterface.dropTable('joinChannels');
|
||||
}
|
||||
};
|
@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.createTable('leaveChannels', {
|
||||
id: {
|
||||
allowNull: false,
|
||||
autoIncrement: true,
|
||||
primaryKey: true,
|
||||
type: Sequelize.INTEGER
|
||||
},
|
||||
channelID: {
|
||||
type: Sequelize.BIGINT
|
||||
},
|
||||
guildID: {
|
||||
type: Sequelize.BIGINT
|
||||
},
|
||||
message: {
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
createdAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
},
|
||||
updatedAt: {
|
||||
allowNull: false,
|
||||
type: Sequelize.DATE
|
||||
}
|
||||
});
|
||||
},
|
||||
down: (queryInterface, Sequelize) => {
|
||||
return queryInterface.dropTable('leaveChannels');
|
||||
}
|
||||
};
|
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
const joinChannel = sequelize.define('joinChannel', {
|
||||
channelID: DataTypes.BIGINT,
|
||||
guildID: DataTypes.BIGINT,
|
||||
message: DataTypes.STRING
|
||||
}, {});
|
||||
joinChannel.associate = function(models) {
|
||||
// associations can be defined here
|
||||
};
|
||||
return joinChannel;
|
||||
};
|
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
const leaveChannel = sequelize.define('leaveChannel', {
|
||||
channelID: DataTypes.BIGINT,
|
||||
guildID: DataTypes.BIGINT,
|
||||
message: DataTypes.STRING
|
||||
}, {});
|
||||
leaveChannel.associate = function(models) {
|
||||
// associations can be defined here
|
||||
};
|
||||
return leaveChannel;
|
||||
};
|
Loading…
Reference in New Issue