summaryrefslogtreecommitdiffstats
path: root/backend/migrations/20200205194947_user_add_activated_email.js
diff options
context:
space:
mode:
Diffstat (limited to 'backend/migrations/20200205194947_user_add_activated_email.js')
-rw-r--r--backend/migrations/20200205194947_user_add_activated_email.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/backend/migrations/20200205194947_user_add_activated_email.js b/backend/migrations/20200205194947_user_add_activated_email.js
new file mode 100644
index 0000000..cf58c35
--- /dev/null
+++ b/backend/migrations/20200205194947_user_add_activated_email.js
@@ -0,0 +1,13 @@
+exports.up = function(knex) {
+ return knex.schema.table('users', function(table) {
+ table.string('email').notNullable().default('');
+ table.boolean('activated').notNullable().default(false);
+ });
+};
+
+exports.down = function(knex) {
+ return knex.schema.table('users', function(table) {
+ table.dropColumn('email');
+ table.dropColumn('activated');
+ });
+};