Skip to content

Commit

Permalink
fix: adding project contacts to dev data
Browse files Browse the repository at this point in the history
  • Loading branch information
gurjmatharu committed Aug 8, 2022
1 parent ccb9ee4 commit e05bd68
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions schema/data/dev/004_cif_project.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,23 @@ do $$
),
'create', 'cif', 'project_manager', 'pending', 'project_manager', current_revision.id);

update cif.form_change
set new_form_data= jsonb_build_object(
insert into cif.form_change(
new_form_data,
operation,
form_data_schema_name,
form_data_table_name,
change_status,
json_schema_name,
project_revision_id
)
values
(
json_build_object(
'contactId', index,
'projectId', index,
'projectId', (select form_data_record_id from cif.form_change where form_data_table_name='project' and project_revision_id=current_revision.id),
'contactIndex', 1
)
where project_revision_id=current_revision.id and form_data_table_name='project_contact';

),
'create', 'cif', 'project_contact', 'pending', 'project_contact', current_revision.id);
end loop;
end
$$;
Expand Down

0 comments on commit e05bd68

Please sign in to comment.