Add Home
commit
9834a1ade7
29
Home.md
Normal file
29
Home.md
Normal file
@ -0,0 +1,29 @@
|
||||
### Import social issues
|
||||
|
||||
```
|
||||
INSERT INTO chill_person_social_issue (id, parent_id, title, ordering)
|
||||
SELECT nextval('chill_person_social_issue_id_seq'), id, jsonb_build_object('fr', sub.content), i.ordering + sub.ordering::double precision
|
||||
FROM chill_person_social_issue i
|
||||
CROSS JOIN (VALUES
|
||||
('Informer, conseiller', 0.005),
|
||||
('Réorienter', 0.015),
|
||||
('Démarches administratives', 0.055) )
|
||||
AS sub(content, ordering);
|
||||
```
|
||||
|
||||
### Import social actions
|
||||
|
||||
```
|
||||
-- ajoute les trois actions "Informer, conseiller", "Réorienter" et "Démarche administrative"
|
||||
-- à toutes les problématiques "enfants" (qui ont un parent) (/!\ ne fonctionne que s'il y a deux niveaux de problématique: parent et enfant, et donc pas de petits-enfants)
|
||||
|
||||
INSERT INTO chill_person_social_action (id, issue_id, title, ordering)
|
||||
SELECT nextval('chill_person_social_action_id_seq'), id, jsonb_build_object('fr', sub.content), i.ordering + sub.ordering::double precision
|
||||
FROM chill_person_social_issue i
|
||||
CROSS JOIN (VALUES
|
||||
('Informer, conseiller', 0.005),
|
||||
('Réorienter', 0.015),
|
||||
('Démarches administratives', 0.025) )
|
||||
AS sub(content, ordering)
|
||||
WHERE i.parent_id IS NOT NULL;
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user