diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2020-02-05 22:31:16 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2020-02-05 22:31:16 +0200 |
| commit | 72b5fc9357f0100f4cc560c1430f7ea2d849eb40 (patch) | |
| tree | 81acb78eae4f69e7b24b2c2d3359d63ba44a82c2 /backend/migrations/20200205194947_user_add_activated_email.js | |
| parent | 6327535653f5ff1abc9f5bbf666268d41abb4d74 (diff) | |
Implement account activation
Diffstat (limited to 'backend/migrations/20200205194947_user_add_activated_email.js')
| -rw-r--r-- | backend/migrations/20200205194947_user_add_activated_email.js | 13 |
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'); + }); +}; |
