Skip to content

Commit

Permalink
Added commands to docs
Browse files Browse the repository at this point in the history
Severino committed Oct 30, 2024
1 parent 33c5b97 commit 982b385
Showing 3 changed files with 78 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
@@ -17,18 +17,27 @@ export default [
{
text: 'Developer',
collapsible: true,
prefix: '/developer/',
children: [
'/developer/overview',
'/developer/coding-structure',
'/developer/plugins',
'overview',
'coding-structure',
'plugins',
{
text: 'Classes',
collapsible: true,
children: [
'/developer/classes/entity_type',
]
},
'/developer/docs',
{
text: 'Commands',
collapsible: true,
prefix: '/developer/commands/',
children: [
'export-types',
'refresh-testing'
]
},
]
}
]
43 changes: 43 additions & 0 deletions docs/developer/commands/export-types.md
Original file line number Diff line number Diff line change
@@ -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`.

22 changes: 22 additions & 0 deletions docs/developer/commands/refresh-testing.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 982b385

Please sign in to comment.