parent
d015f24855
commit
731626aba0
@ -0,0 +1,33 @@
|
|||||||
|
'use strict';
|
||||||
|
module.exports = {
|
||||||
|
up: (queryInterface, Sequelize) => {
|
||||||
|
return queryInterface.createTable('ytpHashes', {
|
||||||
|
id: {
|
||||||
|
allowNull: false,
|
||||||
|
autoIncrement: true,
|
||||||
|
primaryKey: true,
|
||||||
|
type: Sequelize.INTEGER
|
||||||
|
},
|
||||||
|
hash: {
|
||||||
|
type: Sequelize.STRING
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
type: Sequelize.STRING
|
||||||
|
},
|
||||||
|
messageID: {
|
||||||
|
type: Sequelize.BIGINT
|
||||||
|
},
|
||||||
|
createdAt: {
|
||||||
|
allowNull: false,
|
||||||
|
type: Sequelize.DATE
|
||||||
|
},
|
||||||
|
updatedAt: {
|
||||||
|
allowNull: false,
|
||||||
|
type: Sequelize.DATE
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
down: (queryInterface, Sequelize) => {
|
||||||
|
return queryInterface.dropTable('ytpHashes');
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,12 @@
|
|||||||
|
'use strict';
|
||||||
|
module.exports = (sequelize, DataTypes) => {
|
||||||
|
const ytpHash = sequelize.define('ytpHash', {
|
||||||
|
hash: DataTypes.STRING,
|
||||||
|
link: DataTypes.STRING,
|
||||||
|
messageID: DataTypes.BIGINT
|
||||||
|
}, {});
|
||||||
|
ytpHash.associate = function(models) {
|
||||||
|
// associations can be defined here
|
||||||
|
};
|
||||||
|
return ytpHash;
|
||||||
|
};
|
Loading…
Reference in New Issue