diff --git a/docs/.vuepress/sidebar.ts b/docs/.vuepress/sidebar.ts index ff96f28..b5d6abf 100644 --- a/docs/.vuepress/sidebar.ts +++ b/docs/.vuepress/sidebar.ts @@ -17,10 +17,11 @@ export default [ { text: 'Developer', collapsible: true, + prefix: '/developer/', children: [ - '/developer/overview', - '/developer/coding-structure', - '/developer/plugins', + 'overview', + 'coding-structure', + 'plugins', { text: 'Classes', collapsible: true, @@ -28,7 +29,15 @@ export default [ '/developer/classes/entity_type', ] }, - '/developer/docs', + { + text: 'Commands', + collapsible: true, + prefix: '/developer/commands/', + children: [ + 'export-types', + 'refresh-testing' + ] + }, ] } ] \ No newline at end of file diff --git a/docs/developer/commands/export-types.md b/docs/developer/commands/export-types.md new file mode 100644 index 0000000..39f33ac --- /dev/null +++ b/docs/developer/commands/export-types.md @@ -0,0 +1,43 @@ +--- +introduced_at: 0.10.2 +--- +# Export Entity Types (Data Model) + +Copies all entity types and their related data from the regular database (`DEFAULT_DB`) to a different database (`TRANSFER_DB`) based on a single entity of the `DEFAULT_DB` that needs to be specified using the `--entity` parameter. + +The program will collect all data and requires a user confirmation before changing any data inside the transfer database. The data can be evaluated in the `transfer.log` that is located at `storage/logs/transfer.log`. + +This will transfer + ++ Entity Types ++ Entity Type Relations ++ Attributes ++ Entity Attribute Relations ++ Thesaurus Concepts ++ Thesaurus Concept Relations (broader/narrower) ++ Thesaurus Labels (of the languages 'en' and 'de') + + +## Example + +``` +php artisan app:export-types --entity=31 +``` + +## Requirements + +The `TRANSFER_DB` need to be defined inside the .env file: + +``` +DB_TRANSFER_CONNECTION=pgsql +DB_TRANSFER_HOST=localhost +DB_TRANSFER_PORT=5432 +DB_TRANSFER_DATABASE=transfer-db +DB_TRANSFER_USERNAME=spacialist_user +DB_TRANSFER_PASSWORD=spacialist_user +``` + +## Parameters + +`-e, --entity` Define the entity that should be the basis for the data model export. That entity and all it's child entities will be scanned to collect all related information that will be transfered to the `TRANSFER_DB`. + diff --git a/docs/developer/commands/refresh-testing.md b/docs/developer/commands/refresh-testing.md new file mode 100644 index 0000000..60eeb05 --- /dev/null +++ b/docs/developer/commands/refresh-testing.md @@ -0,0 +1,22 @@ +--- +introduced_at: 0.10.2 +--- +# Refresh Testing + +Refreshes the database and optionally runs all tests. + +## Example + +``` +php artisan app:test +``` + +## Requirements + +The application must have a `.env.testing` file setup. + +## Parameters + +`-r, --refresh` Must be set to run a migration and the DemoSeeder on the database. (Does a config:clear to prevent running the migration on the main db). + +`-s, --skip` Skips the testing process.