diff options
author | jloup <jloup@jloup.work> | 2018-05-13 15:47:59 +0100 |
---|---|---|
committer | jloup <jloup@jloup.work> | 2018-05-13 15:47:59 +0100 |
commit | cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6 (patch) | |
tree | 0a5de670cf7f03ab8d582e28c006b643b0c6e22d /db/migrations.go | |
parent | 391835378931665f449c2e99dc070292d193409e (diff) | |
download | Front-cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6.tar.gz Front-cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6.tar.zst Front-cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6.zip |
User roles.v0.0.13
Diffstat (limited to 'db/migrations.go')
-rw-r--r-- | db/migrations.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrations.go b/db/migrations.go index f0df49c..e8fc40d 100644 --- a/db/migrations.go +++ b/db/migrations.go | |||
@@ -89,4 +89,15 @@ var migrations []Migration = []Migration{ | |||
89 | "DROP TYPE market_config_status", | 89 | "DROP TYPE market_config_status", |
90 | }, | 90 | }, |
91 | }, | 91 | }, |
92 | { | ||
93 | Version: 201805131000, | ||
94 | Up: []string{ | ||
95 | "CREATE TYPE user_role AS ENUM ('admin', 'user')", | ||
96 | "ALTER TABLE users ADD role user_role NOT NULL DEFAULT 'user'", | ||
97 | }, | ||
98 | Down: []string{ | ||
99 | "ALTER TABLE users DROP COLUMN role", | ||
100 | "DROP TYPE user_role", | ||
101 | }, | ||
102 | }, | ||
92 | } | 103 | } |