diff --git a/backend/README.md b/backend/README.md index 7d280167..a98e5cb1 100644 --- a/backend/README.md +++ b/backend/README.md @@ -13,4 +13,22 @@ npx directus-sync push \ --directus-url http://localhost:8055 \ --directus-email admin@it4c.dev \ --directus-password admin123 +``` + +## Seed Data for local development +Seed the development data via: +``` +npx directus-sync seed push \ + --directus-url http://localhost:8055 \ + --directus-email admin@it4c.dev \ + --directus-password admin123 +``` + +## Seed Data - find differences +In order so see what changes would appear when seeding, you can execute: +``` +npx directus-sync seed diff \ + --directus-url http://localhost:8055 \ + --directus-email admin@it4c.dev \ + --directus-password admin123 ``` \ No newline at end of file diff --git a/backend/directus-config/seed/maps.json b/backend/directus-config/seed/maps.json new file mode 100644 index 00000000..59a8443b --- /dev/null +++ b/backend/directus-config/seed/maps.json @@ -0,0 +1,18 @@ +{ + "collection": "maps", + "meta": { + "insert_order": 1, + "create": true, + "update": true, + "delete": true, + "preserve_ids": false, + "ignore_on_update": [] + }, + "data": [ + { + "_sync_id": "local-development", + "name": "Local Development", + "url": "http://local.development" + } + ] +} \ No newline at end of file