mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
directus minimal seed & seed instructions (#305)
This commit is contained in:
parent
cfd7ca1a26
commit
9b2ac9f74f
@ -23,6 +23,24 @@ npx directus-sync push \
|
||||
--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
|
||||
```
|
||||
|
||||
## Backup Database
|
||||
Either keep a copy of the `/data/database` folder or run the following command to get an sql dump
|
||||
|
||||
|
||||
18
backend/directus-config/seed/maps.json
Normal file
18
backend/directus-config/seed/maps.json
Normal file
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user