diff --git a/backend/directus-config/development/seed/relations.json b/backend/directus-config/development/seed/relations.json new file mode 100644 index 00000000..8b117383 --- /dev/null +++ b/backend/directus-config/development/seed/relations.json @@ -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 + } + ] +} \ No newline at end of file diff --git a/backend/directus-config/development/sql/type-ui-components.sql b/backend/directus-config/development/sql/type-ui-components.sql index a939e120..6aead971 100644 --- a/backend/directus-config/development/sql/type-ui-components.sql +++ b/backend/directus-config/development/sql/type-ui-components.sql @@ -86,6 +86,32 @@ 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', '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,