summaryrefslogtreecommitdiffstats
path: root/server/migrations
diff options
context:
space:
mode:
authorJannik Schönartz2018-07-02 21:52:25 +0200
committerJannik Schönartz2018-07-02 21:52:25 +0200
commitaa4e552a03657a63922f5cd085431257c183f458 (patch)
treefc8cd63129bb54b06326c11847a9731fe70f1b33 /server/migrations
downloadbas-aa4e552a03657a63922f5cd085431257c183f458.tar.gz
bas-aa4e552a03657a63922f5cd085431257c183f458.tar.xz
bas-aa4e552a03657a63922f5cd085431257c183f458.zip
[server] Initial commit to add the node server stuff.
Diffstat (limited to 'server/migrations')
-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