Skip to content

Commit

Permalink
Add migration for notifications create_on row (#382)
Browse files Browse the repository at this point in the history
### Description

Add migration for #371

### Checklist

- [ ] Created tests which fail without the change (if possible)
- [x] All tests passing
- [ ] Extended the documentation, if necessary

---------

Co-authored-by: Petitoto <[email protected]>
  • Loading branch information
Petitoto and Petitoto authored Mar 18, 2024
1 parent ce04f1f commit 7e34933
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions migrations/versions/7-notifications_create_on.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Notifications 'create_on' migration
Revision ID: e3d06397960d
Revises: 6afc765adaa2
Create Date: 2024-03-17 19:19:14.297195
"""

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "e3d06397960d"
down_revision: str | None = "6afc765adaa2"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
op.alter_column(
"notification_message",
"expire_on",
type_=sa.DateTime(timezone=False),
)


def downgrade() -> None:
op.alter_column(
"notification_message",
"expire_on",
type_=sa.Date(),
)

0 comments on commit 7e34933

Please sign in to comment.