Skip to content

Commit

Permalink
docs(config): updates config docs for correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
MattGson committed May 20, 2021
1 parent 9cd21ce commit ce14b3b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
[Relational-schema](https://mattgson.github.io/relational-schema/) is a utility package to generate a semantic,
complete schema of a relational database (PostgreSQL, MySQL) in Javascript, JSON and other formats.

Relational-schema is built on top of trusted open-source projects:

- [Knex](https://github.com/knex/knex)

Works with MySQL and PostgreSQL. SQLite coming soon.

Full docs [here](https://mattgson.github.io/relational-schema/)
Expand Down Expand Up @@ -45,11 +41,12 @@ Projects using Relational-schema
npm install relational-schema
```

Create a config file `introspect-config.json`
Create a config file `relation-config.json`

```json
{
"host": "127.0.0.1",
"client": "mysql",
"port": 3306,
"user": "root",
"password": "secure",
Expand All @@ -60,7 +57,7 @@ Create a config file `introspect-config.json`
```

```
relational-schema introspect
relations introspect
```

The schema will be generated in `outdir` in the chosen format.
Expand Down Expand Up @@ -596,3 +593,7 @@ The schema will be generated in `outdir` in the chosen format.
}
}
```

Relational-schema is built on top of trusted open-source projects:

- [Knex](https://github.com/knex/knex)
23 changes: 12 additions & 11 deletions docs/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ sidebar_label: Introduction
[Relational-schema](https://mattgson.github.io/relational-schema/) is a utility package to generate a semantic,
complete schema of a relational database (PostgreSQL, MySQL) in Javascript, JSON and other formats.

Relational-schema is built on top of trusted open-source projects:

- [Knex](https://github.com/knex/knex)

Works with MySQL and PostgreSQL. SQLite coming soon.

Full docs [here](https://mattgson.github.io/relational-schema/)
Expand Down Expand Up @@ -52,11 +48,12 @@ Projects using Relational-schema
npm install relational-schema
```

Create a config file `introspect-config.json`
Create a config file `relation-config.json`

```json
{
"host": "127.0.0.1",
"client": "mysql",
"port": 3306,
"user": "root",
"password": "secure",
Expand All @@ -67,7 +64,7 @@ Create a config file `introspect-config.json`
```

```
relational-schema introspect
relations introspect
```

The schema will be generated in `outdir` in the chosen format.
Expand All @@ -80,12 +77,12 @@ The schema will be generated in `outdir` in the chosen format.

- columns (names, types, default values, nullability...)
- keys and constraints
- unique-ness
- uniqueness
- Typescript type mappings
- table relations (including direction, transitive relations)
- human readable relation alias'
- table relations (including direction, cardinality, transitive (m2m)...)
- humanized relation alias' based on cardinality
- soft-delete idenfication
- enums
- custom types (enums, sets)

---

Expand All @@ -94,7 +91,7 @@ The schema will be generated in `outdir` in the chosen format.
```json
{
"database": "tests",
"schema": "public",
"schema": "tests",
"generatedAt": "2021-04-21T08:41:31.747Z",
"tables": {
"teams": {
Expand Down Expand Up @@ -603,3 +600,7 @@ The schema will be generated in `outdir` in the chosen format.
}
}
```

Relational-schema is built on top of trusted open-source projects:

- [Knex](https://github.com/knex/knex)

0 comments on commit ce14b3b

Please sign in to comment.