summaryrefslogtreecommitdiffstats
path: root/server/migrations/20180522185323-create-user.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/migrations/20180522185323-create-user.js')
-rw-r--r--server/migrations/20180522185323-create-user.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/migrations/20180522185323-create-user.js b/server/migrations/20180522185323-create-user.js
new file mode 100644
index 0000000..42527da
--- /dev/null
+++ b/server/migrations/20180522185323-create-user.js
@@ -0,0 +1,31 @@
+'use strict';
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('users', {
+ id: {
+ allowNull: false,
+ autoIncrement: true,
+ primaryKey: true,
+ type: Sequelize.INTEGER
+ },
+ id: {
+ type: Sequelize.INTEGER
+ },
+ username: {
+ type: Sequelize.STRING
+ },
+ password: {
+ type: Sequelize.STRING
+ },
+ email: {
+ type: Sequelize.STRING
+ },
+ name: {
+ type: Sequelize.STRING
+ }
+ });
+ },
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('users');
+ }
+}; \ No newline at end of file