From d2f4e60b16348891aaff628abd259100cf842cc7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 27 Oct 2019 00:55:25 +0200 Subject: [PATCH] donator database --- migrations/20191026223359-create-donator.js | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/20191026223359-create-donator.js diff --git a/migrations/20191026223359-create-donator.js b/migrations/20191026223359-create-donator.js new file mode 100644 index 00000000..146ba8bc --- /dev/null +++ b/migrations/20191026223359-create-donator.js @@ -0,0 +1,30 @@ +'use strict'; +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.createTable('donators', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + userID: { + type: Sequelize.BIGINT + }, + comment: { + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('donators'); + } +}; \ No newline at end of file