-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Remove organization and user scoped parameters (#2007)
* feat: Remove organization and user scoped parameters Signed-off-by: Spike Curtis <spike@coder.com> * Fixup dump.sql Signed-off-by: Spike Curtis <spike@coder.com> * Fix dump.sql again Signed-off-by: Spike Curtis <spike@coder.com> * Fix down migration Signed-off-by: Spike Curtis <spike@coder.com>
- Loading branch information
1 parent
582d636
commit d8c4401
Showing
11 changed files
with
90 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
coderd/database/migrations/000019_drop_org_user_parameter_scope.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TYPE old_parameter_scope AS ENUM ( | ||
'organization', | ||
'template', | ||
'import_job', | ||
'user', | ||
'workspace' | ||
); | ||
ALTER TABLE parameter_values ALTER COLUMN scope TYPE old_parameter_scope USING (scope::text::old_parameter_scope); | ||
DROP TYPE parameter_scope; | ||
ALTER TYPE old_parameter_scope RENAME TO parameter_scope; |
11 changes: 11 additions & 0 deletions
11
coderd/database/migrations/000019_drop_org_user_parameter_scope.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- We no longer support org or user scoped values, so delete them | ||
DELETE FROM parameter_values WHERE scope IN ('organization', 'user'); | ||
|
||
CREATE TYPE new_parameter_scope AS ENUM ( | ||
'template', | ||
'import_job', | ||
'workspace' | ||
); | ||
ALTER TABLE parameter_values ALTER COLUMN scope TYPE new_parameter_scope USING (scope::text::new_parameter_scope); | ||
DROP TYPE parameter_scope; | ||
ALTER TYPE new_parameter_scope RENAME TO parameter_scope; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.