Skip to content

Commit 706dd89

Browse files
author
Rohit Shende
committed
Added documentation for new changes
1 parent ad71f00 commit 706dd89

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ What's different:
1111
* If column has a server_default set it to `FetchValue()` instead of trying to determine what that value is. Original code did not set the right server defaults in my setup.
1212
* `--ignore-cols` ignores special columns when generating association tables. Original code requires all columns to be foreign keys in order to generate association table. Example: `--ignore-cols id,inserted,updated`.
1313
* Uses the command `flask-sqlacodegen` instead of `sqlacodegen`.
14+
* Added support for `--notables` to only generate model classes, even for association tables
1415

1516
## Install
1617

@@ -25,3 +26,11 @@ git clone https://github.com/ksindi/flask-sqlacodegen.git
2526
cd flask-sqlacodegen/
2627
python setup.py install
2728
```
29+
30+
For contributing:
31+
```sh
32+
git clone https://github.com/ksindi/flask-sqlacodegen.git
33+
python -m venv env
34+
pip install -r requirements.txt
35+
python -m sqlacodegen.main --flask --outfile models.py mysql+pymysql://<username>:<password>@<database-ip>:<port>/<database-name> [--tables <tablenames>] [--notables]
36+
```

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ What's different:
2424
order to generate association table. Example:
2525
``--ignore-cols id,inserted,updated``.
2626
- Uses the command ``flask-sqlacodgen`` instead of ``sqlacodegen``.
27+
- Added support for ``--notables`` to only generate model classes, even for association tables
2728

2829
Install
2930
-------

0 commit comments

Comments
 (0)