-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding a "Name" Column to "Flows" table (#3203)
Co-authored-by: Rory Doak <[email protected]> Co-authored-by: Dafydd Llŷr Pearson <[email protected]>
- Loading branch information
1 parent
c250d10
commit 508175f
Showing
4 changed files
with
30 additions
and
4 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
3 changes: 3 additions & 0 deletions
3
hasura.planx.uk/migrations/1716902907392_alter_table_public_flows_add_column_name/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,3 @@ | ||
comment on column "public"."flows"."name" is NULL; | ||
|
||
ALTER TABLE flows DROP COLUMN name; |
9 changes: 9 additions & 0 deletions
9
hasura.planx.uk/migrations/1716902907392_alter_table_public_flows_add_column_name/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,9 @@ | ||
alter table "public"."flows" add column "name" text | ||
null; | ||
comment on column "public"."flows"."name" is 'The name of the flow, entered by the user and used to generate the "slug"'; | ||
|
||
UPDATE flows | ||
SET name = replace(concat(upper(substring(slug,1,1)),right(slug,-1)),'-',' ') | ||
WHERE name IS NULL | ||
|
||
|
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