Skip to content

chore: rename 'first-organization' to 'coder' #14808

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 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cli/testdata/coder_list_--output_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"owner_name": "testuser",
"owner_avatar_url": "",
"organization_id": "[first org ID]",
"organization_name": "first-organization",
"organization_name": "coder",
"template_id": "[template ID]",
"template_name": "test-template",
"template_display_name": "",
Expand Down
4 changes: 2 additions & 2 deletions coderd/database/dbmem/dbmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func New() database.Store {
// Always start with a default org. Matching migration 198.
defaultOrg, err := q.InsertOrganization(context.Background(), database.InsertOrganizationParams{
ID: uuid.New(),
Name: "first-organization",
DisplayName: "first-organization",
Name: "coder",
DisplayName: "Coder",
Description: "Builtin default organization.",
Icon: "",
CreatedAt: dbtime.Now(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Leave the name as 'coder', there is no downside.
-- The old name 'first-organization' is not used anywhere, just the
-- is_default property.
10 changes: 10 additions & 0 deletions coderd/database/migrations/000259_rename_first_organization.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
UPDATE
organizations
SET
name = 'coder',
display_name = 'Coder'
WHERE
-- The old name was too long.
name = 'first-organization'
AND is_default = true
;
2 changes: 1 addition & 1 deletion enterprise/cli/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ func TestEnterpriseCreate(t *testing.T) {
err := inv.Run()
require.Error(t, err)
// The error message should indicate the flag to fix the issue.
require.ErrorContains(t, err, fmt.Sprintf("--org=%q", "first-organization"))
require.ErrorContains(t, err, fmt.Sprintf("--org=%q", "coder"))
})
}
Loading