mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
feat(backend): directus seed advanced (#306)
* directus minimal seed & seed instructions * more seed data * places-layer --------- Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
This commit is contained in:
parent
aa13c44cba
commit
5c79633ea4
@ -118,3 +118,4 @@ sudo chmod 777 -R ./data/
|
||||
This process is to be repeated whenever you restart the database docker container
|
||||
|
||||
The same applies for the uploads and extension folder - ensure that the folder is writeable or file uploads will fail.
|
||||
|
||||
|
||||
26
backend/directus-config/seed/layers.json
Normal file
26
backend/directus-config/seed/layers.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"collection": "layers",
|
||||
"meta": {
|
||||
"insert_order": 1,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true,
|
||||
"preserve_ids": false,
|
||||
"ignore_on_update": []
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "layer-places",
|
||||
"name": "Places",
|
||||
"itemType": "type-test",
|
||||
"userProfileLayer": false,
|
||||
"menuColor": "#2ECDA7",
|
||||
"markerDefaultColor2": null,
|
||||
"onlyOnePerOwner": false,
|
||||
"index_plus_button": true,
|
||||
"public_edit_items": false,
|
||||
"listed": true,
|
||||
"item_presets": null
|
||||
}
|
||||
]
|
||||
}
|
||||
18
backend/directus-config/seed/layers_maps.json
Normal file
18
backend/directus-config/seed/layers_maps.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"collection": "layers_maps",
|
||||
"meta": {
|
||||
"insert_order": 1,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true,
|
||||
"preserve_ids": false,
|
||||
"ignore_on_update": []
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "layer-places-map-local-development",
|
||||
"layers_id": "layer-places",
|
||||
"maps_id": "map-local-development"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -10,9 +10,21 @@
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "local-development",
|
||||
"_sync_id": "map-local-development",
|
||||
"name": "Local Development",
|
||||
"url": "http://local.development"
|
||||
"url": "http://local.development",
|
||||
"zoom": 6,
|
||||
"own_tag_space": true,
|
||||
"center": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
10.067625824315172,
|
||||
50.51565268622562
|
||||
]
|
||||
},
|
||||
"donation_widget": false,
|
||||
"custom_text": "# Welcome to the Development Server\n\nThis map is just for development purposes and to try out new things.",
|
||||
"default_theme": null
|
||||
}
|
||||
]
|
||||
}
|
||||
22
backend/directus-config/seed/types.json
Normal file
22
backend/directus-config/seed/types.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"collection": "types",
|
||||
"meta": {
|
||||
"insert_order": 1,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true,
|
||||
"preserve_ids": false,
|
||||
"ignore_on_update": []
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "type-test",
|
||||
"user_created": null,
|
||||
"date_created": "2025-01-01T00:00:00.000Z",
|
||||
"user_updated": null,
|
||||
"date_updated": null,
|
||||
"name": "test",
|
||||
"template": "flex"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user