aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2018-02-20 22:44:42 -0800
committerAdam Soltys <[email protected]>2018-02-20 22:44:42 -0800
commitaecc01cdaf848c19b324dc299cb6ece550a01b29 (patch)
tree1cd99f25f6fd446862481b7e40d34e7fe399c114 /migrations
parent5441b2fdd310153774eed6e335408253606a4d78 (diff)
downloadcoinos-server-aecc01cdaf848c19b324dc299cb6ece550a01b29.tar.gz
coinos-server-aecc01cdaf848c19b324dc299cb6ece550a01b29.zip
keep track of users' invoices
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')
+ },
+};