ksindi / flask-sqlacodegen

:sake: Automatic model code generator for SQLAlchemy with Flask support
Other
336 stars 60 forks source link

Missing s in table name #10

Closed rsd closed 8 years ago

rsd commented 8 years ago

Hello,

For some reason sqlacodegen (1.1.6), misses the s in the table name. I have the following tables in mysql (5.6.28): podcast -> Podcast podcast_item -> PodcastItem podcast_items -> PodcastItem <-- Missing the "s"

I believe that this should be something trivial to spot in the table name translation code.

Let me know if I can help in any way.

ksindi commented 8 years ago

@rsd Sorry for the late response. I think you're right: class names are made singular. You would have to modify: https://github.com/ksindi/flask-sqlacodegen/blob/master/sqlacodegen/codegen.py#L339. Feel free to create a pull request.