diff options
| author | Adam Soltys <[email protected]> | 2021-07-13 11:20:23 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-07-13 11:21:33 -0700 |
| commit | 6388e2b98843ad8ee5db855632334174efdaeedc (patch) | |
| tree | 701647d738d0b13cd41bdf9b75180e4923422d76 /db/migrations | |
| parent | fc3e802856d1209ee9e47e3f0a2a073c475bd7ae (diff) | |
| download | coinos-server-6388e2b98843ad8ee5db855632334174efdaeedc.tar.gz coinos-server-6388e2b98843ad8ee5db855632334174efdaeedc.zip | |
user admin field and auth middleware
Diffstat (limited to 'db/migrations')
| -rw-r--r-- | db/migrations/20210713174217_add_admin_to_users.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrations/20210713174217_add_admin_to_users.js b/db/migrations/20210713174217_add_admin_to_users.js new file mode 100644 index 00000000..c8e009b1 --- /dev/null +++ b/db/migrations/20210713174217_add_admin_to_users.js @@ -0,0 +1,11 @@ +exports.up = async function(knex) { + return knex.schema.table("users", function(table) { + table.boolean("admin"); + }); +}; + +exports.down = async function(knex) { + return knex.schema.table("users", function(table) { + table.dropColumn("admin"); + }); +}; |
