mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
seed relations
This commit is contained in:
parent
213b97dfd5
commit
119afe2ea0
27
backend/directus-config/development/seed/relations.json
Normal file
27
backend/directus-config/development/seed/relations.json
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"collection": "relations",
|
||||||
|
"meta": {
|
||||||
|
"insert_order": 1,
|
||||||
|
"create": true,
|
||||||
|
"update": true,
|
||||||
|
"delete": true,
|
||||||
|
"preserve_ids": true,
|
||||||
|
"ignore_on_update": []
|
||||||
|
},
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"_sync_id": "1",
|
||||||
|
"relation": "is_following",
|
||||||
|
"heading": "Following",
|
||||||
|
"direction": "outgoing",
|
||||||
|
"hideWhenEmpty": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_sync_id": "2",
|
||||||
|
"relation": "is_following",
|
||||||
|
"heading": "Follower",
|
||||||
|
"direction": "ingoing",
|
||||||
|
"hideWhenEmpty": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -91,3 +91,29 @@ ON CONFLICT (id) DO UPDATE
|
|||||||
item = excluded.item,
|
item = excluded.item,
|
||||||
sort = excluded.sort,
|
sort = excluded.sort,
|
||||||
types_id = excluded.types_id;
|
types_id = excluded.types_id;
|
||||||
|
|
||||||
|
INSERT INTO public."types_profileTemplate" (collection, id, item, sort, types_id)
|
||||||
|
SELECT
|
||||||
|
'relations', '3', '1' , '3', types.id
|
||||||
|
FROM
|
||||||
|
public.types as types
|
||||||
|
WHERE
|
||||||
|
name = 'user:text+gallery'
|
||||||
|
ON CONFLICT (id) DO UPDATE
|
||||||
|
SET collection = excluded.collection,
|
||||||
|
item = excluded.item,
|
||||||
|
sort = excluded.sort,
|
||||||
|
types_id = excluded.types_id;
|
||||||
|
|
||||||
|
INSERT INTO public."types_profileTemplate" (collection, id, item, sort, types_id)
|
||||||
|
SELECT
|
||||||
|
'relations', '4', '2' , '4', types.id
|
||||||
|
FROM
|
||||||
|
public.types as types
|
||||||
|
WHERE
|
||||||
|
name = 'user:text+gallery'
|
||||||
|
ON CONFLICT (id) DO UPDATE
|
||||||
|
SET collection = excluded.collection,
|
||||||
|
item = excluded.item,
|
||||||
|
sort = excluded.sort,
|
||||||
|
types_id = excluded.types_id;
|
||||||
Loading…
x
Reference in New Issue
Block a user