Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Table comments missing from SQLAlchemy models #61

Open
isedwards opened this issue Oct 5, 2022 · 0 comments
Open

Table comments missing from SQLAlchemy models #61

isedwards opened this issue Oct 5, 2022 · 0 comments

Comments

@isedwards
Copy link
Contributor

isedwards commented Oct 5, 2022

Some database schemas contain table and column comments (e.g. CliDE).

When we used sqlacodegen to create our SQLAlchemy models - any comments in the original SQL DDL were lost.

Should we add comments back in using the table comment parameter? We could also add new comments where they did not exist in the original schema definitions (e.g. Climsoft and MCH)?

A better approach would be to read the comments from the original schema and automate the process of adding these to our models. Where comments don't exist in the original schema we could maintain a dictionary to provide the missing information.

See comments for some Climsoft core tables here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant