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

Make Page table creation-tracked #20

Merged
merged 11 commits into from
Dec 8, 2023
Merged

Make Page table creation-tracked #20

merged 11 commits into from
Dec 8, 2023

Conversation

duynguyen158
Copy link
Contributor

@duynguyen158 duynguyen158 commented Dec 8, 2023

Description

Turns Page table from update-tracked to creation-tracked, i.e., removing its db_updated_at column.

Some smaller changes:

  • Explicitly specifies the relationship between Page and Article as one-to-one using SQLAlchemy's {"uselist": False}.
  • Deletes the article_rec_db/sites directory. Now DB models are completely site-agnostic and truly reusable.
  • Replaces typing.Annotation with the normal way to assign Fields and Relationships. This doesn't change anything and just makes downstream code easier to pass Pydantic checks.

Terraform

No changes.

Alembic

Refer to alembic directory for latest revision.

Testing

Adds a new test to test upserting an article, and deletes the page-update test. All tests passed.

@duynguyen158 duynguyen158 merged commit 6404a18 into dev Dec 8, 2023
1 check passed
@duynguyen158 duynguyen158 deleted the add-upsert-test branch December 8, 2023 21:10
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.

1 participant