-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom cleanup conversations and files by org (#275)
* conv file lifespan * gdpr compliant clean up, unify alembic * model * alembic * user count * camel case * model
- Loading branch information
1 parent
f2f0c1e
commit cbad993
Showing
4 changed files
with
53 additions
and
33 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
alembic/versions/eb5ecbee5090_add_conversation_and_file_lifespan.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""add conversation and file lifespan | ||
Revision ID: eb5ecbee5090 | ||
Revises: 89a5f2211130 | ||
Create Date: 2024-11-26 11:03:23.883173 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "eb5ecbee5090" | ||
down_revision = "89a5f2211130" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"organization", | ||
sa.Column("conversation_lifespan_days", sa.Integer(), nullable=True), | ||
) | ||
op.add_column( | ||
"organization", | ||
sa.Column( | ||
"file_lifespan_days", sa.Integer(), nullable=True, server_default="14" | ||
), | ||
) | ||
op.drop_column("organization", "gdpr_compliant") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"organization", | ||
sa.Column("gdpr_compliant", sa.BOOLEAN(), autoincrement=False, nullable=True), | ||
) | ||
op.drop_column("organization", "file_lifespan_days") | ||
op.drop_column("organization", "conversation_lifespan_days") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule model
updated
5 files
+5 −1 | business_objects/organization.py | |
+29 −0 | cognition_objects/conversation.py | |
+13 −1 | cognition_objects/file_reference.py | |
+5 −1 | cognition_objects/message.py | |
+2 −2 | models.py |