-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Feat/postgres table inheritance fixed #524
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
Feat/postgres table inheritance fixed #524
Conversation
Someone is attempting to deploy a commit to the dottle's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for the work but you don't need to open a new pull request when changes are requested. Just apply the changes to your already existing branch and the pull request will be automatically updated. Then mark the comments as resolved. For now I'll go with this. But for future prs please don't do this please |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Left some comments. Please also resolve the merge conflicts and make sure to format the files according to the defined prettier config
Please apply the changes on this branch
Also, out of curiosity how much of this is AI generated?
Co-authored-by: 1ilit <1ilit@proton.me>
|
@1ilit kindly review the pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Left a few minor suggestions
Hey @1ilit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you
* feat: add support for PostgreSQL table inheritance in schema export * fixed the suggested changes in the inheritance feature * Update src/components/EditorSidePanel/TablesTab/TableField.jsx Co-authored-by: 1ilit <1ilit@proton.me> * fixed all the comments * feat: finalize Postgres table inheritance support with fixes and formatting --------- Co-authored-by: kishansinghifs1 <kishansingh956196@gmai.com> Co-authored-by: 1ilit <1ilit@proton.me>
Summary
This PR adds full support for PostgreSQL table inheritance in the schema export generator (#472 ).
What's Included
✅ Proper generation of INHERITS clause in CREATE TABLE statements.
✅ Child tables only include non-inherited fields in SQL output.
✅ Parent table fields are automatically inherited by child tables.
✅ Maintains correct handling of:
PRIMARY KEY, UNIQUE, NOT NULL
DEFAULT, CHECK, and ARRAY modifiers.
✅ Table and column comments are still supported.
Implementation Notes
Used table.inherits array to determine parent table(s).
Computed inheritedFieldNames from parent tables to avoid duplication.
Adjusted PRIMARY KEY generation to apply only to non-inherited fields in child tables.
🖥️ Screen Recording
Screen.Recording.2025-07-02.145149.mp4