Skip to content

Commit 7e109d8

Browse files
committed
Update README.md
1 parent 3dabe6b commit 7e109d8

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
flask-sqlacodegen
22
=================
33

4-
Fork of <a href="https://pypi.python.org/pypi/sqlacodegen">sqlacodegen</a>. Based off of version 1.1.6.
4+
Fork of <a href="https://pypi.python.org/pypi/sqlacodegen">sqlacodegen</a> by Alex Gronholm. Based off of version 1.1.6.
55

66
What's different:
7-
* Support for Flask-SQLAlchemy syntax using `--flask` option. All this means:
8-
* SQLAlchemy class is instantiated (i.e. `db = SQLAlchemy()`).
9-
* Flask-SQLAlchemy columns are used (e.g. `db.Integer`).
10-
* Metadata is only implicit in tables
7+
* Use the command `flask-sqlacodgen` instead of `sqlacodegen`.
8+
* Support for Flask-SQLAlchemy syntax using `--flask` option:
9+
- SQLAlchemy class is instantiated (i.e. `db = SQLAlchemy()`).
10+
- Flask-SQLAlchemy columns are used (e.g. `db.Integer`).
11+
- Metadata is only implicit in tables.
1112
* Defaults to generating backrefs in relationships. `--nobackref` still included as option in case backrefs are not wanted.
1213
* Naming of backrefs is class name in snake_case (as opposed to CamelCase) and is pluralized if it's Many-to-One or Many-to-Many using <a href="https://pypi.python.org/pypi/inflect">inflect</a>.
1314
* Generate explicit primary joins. I deal with pretty complicated tables that need explicit primary joins.
14-
* 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 set up.
15-
* `--ignore-cols` ignores special columns (e.g. id, inserted, updated) 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`.
15+
* 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.
16+
* `--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`.
1617

1718
## Install
1819

19-
Note: planning to upload to pip. In the meantime, use the without pip option.
20+
With pip:
21+
```
22+
pip install flask-sqlacodegen
23+
```
2024

2125
Without pip:
2226
```

0 commit comments

Comments
 (0)