Skip to content

feat: add display_name field to groups #8740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add missing migrations
  • Loading branch information
Emyrk committed Jul 26, 2023
commit 712f81a9916da372f7da0b579ed4f3ac9b47d358
6 changes: 6 additions & 0 deletions coderd/database/migrations/000142_group_display_name.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN;

ALTER TABLE groups
DROP COLUMN display_name;

COMMIT;
11 changes: 11 additions & 0 deletions coderd/database/migrations/000142_group_display_name.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
BEGIN;

ALTER TABLE groups
ADD COLUMN display_name TEXT NOT NULL DEFAULT '';

COMMENT ON COLUMN groups.display_name IS 'Display name is a custom, human-friendly group name that user can set. This is not required to be unique.';

-- Use the name as the display name for all existing groups
UPDATE groups SET display_name = name;

COMMIT;