Skip to content
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

Create new table definitions #104

Open
4 of 8 tasks
micah-prime opened this issue Aug 22, 2024 · 4 comments
Open
4 of 8 tasks

Create new table definitions #104

micah-prime opened this issue Aug 22, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@micah-prime
Copy link
Contributor

micah-prime commented Aug 22, 2024

Let's create all the new table definitions as outlined in the re-organization diagram

Tables to create are

Each table can have it's own file (like @jomey 's reorg)

Tables to update are:

IMG_2841

@micah-prime micah-prime added the enhancement New feature or request label Aug 22, 2024
@micah-prime
Copy link
Contributor Author

These are being pushed to the dev branch, so PRs can be made there

@micah-prime micah-prime self-assigned this Aug 22, 2024
@jomey
Copy link
Member

jomey commented Aug 23, 2024

Noting that we should also add some indexes on the foreign key columns.
One example on how to do this:

name = Column(String, index=True)

@jomey
Copy link
Member

jomey commented Aug 23, 2024

Other definition to consider is to require the presence of an attribute/column via NOT NULL

name = Column(String, nullable=False)

https://docs.sqlalchemy.org/en/20/core/metadata.html#sqlalchemy.schema.Column.params.nullable

@jomey
Copy link
Member

jomey commented Aug 23, 2024

Saving a reference on why we don't need to set limits on varchar
https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_varchar.28n.29_by_default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants