aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20190113193839-create_orders.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/migrations/20190113193839-create_orders.js b/migrations/20190113193839-create_orders.js
new file mode 100644
index 00000000..01e1ffb1
--- /dev/null
+++ b/migrations/20190113193839-create_orders.js
@@ -0,0 +1,25 @@
+'use strict';
+
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('orders', {
+ id: {
+ allowNull: false,
+ autoIncrement: true,
+ primaryKey: true,
+ type: Sequelize.INTEGER
+ },
+ amount: { type: Sequelize.INTEGER },
+ price: { type: Sequelize.INTEGER },
+ type: { type: Sequelize.STRING },
+ pair: { type: Sequelize.STRING },
+ createdAt: {
+ allowNull: false,
+ type: Sequelize.DATE
+ },
+ });
+ },
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('orders');
+ },
+};