Skip to content

Commit

Permalink
add db script
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng committed Jan 29, 2025
1 parent 9c548dd commit dd3142b
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""add action_org_created_at_index
Revision ID: df80b5d155d0
Revises: 3aa0ef96942d
Create Date: 2025-01-29 07:38:58.641024+00:00
"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "df80b5d155d0"
down_revision: Union[str, None] = "3aa0ef96942d"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_index(
"action_org_created_at_index", "actions", ["organization_id", sa.text("created_at DESC")], unique=False
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index("action_org_created_at_index", table_name="actions")
# ### end Alembic commands ###

0 comments on commit dd3142b

Please sign in to comment.