Skip to content

Conversation

@Iain-S
Copy link
Collaborator

@Iain-S Iain-S commented Jan 19, 2023

Previously, we did nothing (continued) if we came across a primary key. This has the problem that tables with a single, PK, column end up with an empty __init__() method.

@Iain-S Iain-S requested a review from mhauru January 19, 2023 15:36
Copy link
Collaborator

@mhauru mhauru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We may run into issues at some point if the primary key carries some important information, right? Not that that should be addressed in this PR.

@Iain-S
Copy link
Collaborator Author

Iain-S commented Jan 23, 2023

Yes, we presume that the primary key will be auto-populated and that it doesn't have any meaning. There are lots of cases where that isn't true and I'm not sure what would happen if we came across a composite primary key either.

@Iain-S Iain-S merged commit 7d93b3c into main Jan 23, 2023
@Iain-S Iain-S deleted the handle_single_column_tables branch January 23, 2023 14:55
tim-band pushed a commit to tim-band/sqlsynthgen that referenced this pull request May 27, 2025
tim-band added a commit to tim-band/sqlsynthgen that referenced this pull request Jun 2, 2025
tim-band added a commit to tim-band/sqlsynthgen that referenced this pull request Jun 2, 2025
* Fixes alan-turing-institute#33, alan-turing-institute#34, alan-turing-institute#31

* documentation normal->generate

* Don't unnecessarily create schema

* dump-data command alan-turing-institute#38

* Initial documentation of orm.yaml

---------

Co-authored-by: Tim Band <t.b@ucl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants