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

Include time_created/time_updated on every model 🛢 #225

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

MelissaAutumn
Copy link
Member

@MelissaAutumn MelissaAutumn commented Jan 10, 2024

Fixes #221

This should put a time_created and time_updated on every model that doesn't already have. It also indexes the existing fields. We no longer have a use for database.py as the declarative base is now in models.py.

I don't think we import database.py anywhere else though.

🛢 This change requires database migration

@MelissaAutumn MelissaAutumn self-assigned this Jan 10, 2024
@devmount devmount changed the title Include time_created/time_updated on every model. Include time_created/time_updated on every model 🛢 Jan 12, 2024
Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

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

Thank you Mel, this is great. We just need to fix the migration order to restore a gapless db migration flow 😅

@MelissaAutumn MelissaAutumn merged commit 8bd4106 into main Jan 12, 2024
1 check passed
@MelissaAutumn MelissaAutumn deleted the features/221-timestamps-on-every-model branch January 12, 2024 18:03
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.

Add time_created and time_updated to every applicable model
2 participants