mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: rename 'first-organization' to 'coder' (#14808)
Rename the first-organization original name. Users can change from the original name.
This commit is contained in:
2
cli/testdata/coder_list_--output_json.golden
vendored
2
cli/testdata/coder_list_--output_json.golden
vendored
@ -7,7 +7,7 @@
|
|||||||
"owner_name": "testuser",
|
"owner_name": "testuser",
|
||||||
"owner_avatar_url": "",
|
"owner_avatar_url": "",
|
||||||
"organization_id": "[first org ID]",
|
"organization_id": "[first org ID]",
|
||||||
"organization_name": "first-organization",
|
"organization_name": "coder",
|
||||||
"template_id": "[template ID]",
|
"template_id": "[template ID]",
|
||||||
"template_name": "test-template",
|
"template_name": "test-template",
|
||||||
"template_display_name": "",
|
"template_display_name": "",
|
||||||
|
@ -92,8 +92,8 @@ func New() database.Store {
|
|||||||
// Always start with a default org. Matching migration 198.
|
// Always start with a default org. Matching migration 198.
|
||||||
defaultOrg, err := q.InsertOrganization(context.Background(), database.InsertOrganizationParams{
|
defaultOrg, err := q.InsertOrganization(context.Background(), database.InsertOrganizationParams{
|
||||||
ID: uuid.New(),
|
ID: uuid.New(),
|
||||||
Name: "first-organization",
|
Name: "coder",
|
||||||
DisplayName: "first-organization",
|
DisplayName: "Coder",
|
||||||
Description: "Builtin default organization.",
|
Description: "Builtin default organization.",
|
||||||
Icon: "",
|
Icon: "",
|
||||||
CreatedAt: dbtime.Now(),
|
CreatedAt: dbtime.Now(),
|
||||||
|
@ -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.
|
@ -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
|
||||||
|
;
|
@ -202,6 +202,6 @@ func TestEnterpriseCreate(t *testing.T) {
|
|||||||
err := inv.Run()
|
err := inv.Run()
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
// The error message should indicate the flag to fix the issue.
|
// 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"))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user