-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to ignore tables #37
Comments
Couldn't you just remove the unwanted tables from the output? |
Agreed! |
Also posted against #39. Unsupported data types cause sqlacodegen to fail without producing any output. My example is spatial datatypes (geography and geometry) in MSSQL. I still want to use SQLAlchemy for almost all my CRUD. I can hand roll my own CRUD for tables with spatial data, but it would be nice to be able to dump the model for most of my DB using sqlacodegen. |
It would seem that the right solution then is for sqlacodegen to automatically skip tables it cannot handle. Agreed? |
Also, if you can point me to a library which adds those geography/geometry types to MSSQL, I'd be happy to add a conditional import for that. |
Ta, perfectly great for me. Would need some sort of feedback to user letting them know why the table was skipped.
The geoalchemy project would appear to add sqlalchemy support for MSSQL spatial datatypes but is not supported for Python >2.6. The geoalchemy2 project, unfortunately does not support MSSQL, only PostGIS/Postgresql Not found anyother liibraries to support MSSQL spatial types in SQLAlchemy. |
That's what I'll do then, assuming there are no problems with this approach coming from the sqlalchemy reflection process itself (which I do not control).
Are those types native to MSSQL? If they are, then it would be best to file a PR against SQLAlchemy itself. |
|
Yup, since MSSQL 2008. |
Originally reported by: Ishan Khare (Bitbucket: ishan_khare, GitHub: Unknown)
just like the
--tables
option which specifies the tables to be processed, there should be a--skip-tables
option. This will be particularly helpful if i have only a few tables to skip among lots of tables.The text was updated successfully, but these errors were encountered: