diff --git a/hasura.planx.uk/migrations/1716902907392_alter_table_public_flows_add_column_name/up.sql b/hasura.planx.uk/migrations/1716902907392_alter_table_public_flows_add_column_name/up.sql index a5dbed1177..5352946d88 100644 --- a/hasura.planx.uk/migrations/1716902907392_alter_table_public_flows_add_column_name/up.sql +++ b/hasura.planx.uk/migrations/1716902907392_alter_table_public_flows_add_column_name/up.sql @@ -1,7 +1,9 @@ alter table "public"."flows" add column "name" text null; - comment on column "public"."feedback"."node_data" is 'The name of the flow, entered by the user and used to generate the "slug"'; + 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 = slug -WHERE name IS NULL; \ No newline at end of file +SET name = replace(initcap(replace(slug,'-','xax')),'xax',' ') +WHERE name IS NULL + +