aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20180221010609-createInvoices.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/migrations/20180221010609-createInvoices.js b/migrations/20180221010609-createInvoices.js
new file mode 100644
index 00000000..3fbcfa21
--- /dev/null
+++ b/migrations/20180221010609-createInvoices.js
@@ -0,0 +1,32 @@
+'use strict';
+
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('invoices', {
+ id: {
+ allowNull: false,
+ autoIncrement: true,
+ primaryKey: true,
+ type: Sequelize.INTEGER,
+ },
+ user_id: {
+ type: Sequelize.INTEGER,
+ },
+ payreq: {
+ type: Sequelize.STRING,
+ },
+ createdAt: {
+ allowNull: false,
+ type: Sequelize.DATE
+ },
+ updatedAt: {
+ allowNull: false,
+ type: Sequelize.DATE
+ },
+ })
+ },
+
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('invoices')
+ },
+};