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

Enhancement: Add the possibility to enable index on AuditColumns mixin #382

Open
Kumzy opened this issue Feb 6, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@Kumzy
Copy link
Member

Kumzy commented Feb 6, 2025

Summary

Implement a way to specify if we want to use the AuditColumns mixin and add index=True on the created_at and updated_at column

Current way to do this would be:

class Conversation(UUIDAuditBase):
    __tablename__ = "conversations"
    __table_args__ = (Index("idx_created_at", "created_at"),)

Basic Example

New way could be like this

class Conversation(UUIDAutidBase, audit_index=True):

Drawbacks and Impact

No response

Unresolved questions

No response

@Kumzy Kumzy added the enhancement New feature or request label Feb 6, 2025
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

1 participant