Files
notifications-api/migrations/versions/0010_events_table.py

35 lines
947 B
Python
Raw Normal View History

"""empty message
2016-04-27 11:48:46 +01:00
Revision ID: 0010_events_table
Revises: 0009_created_by_for_jobs
Create Date: 2016-04-26 13:08:42.892813
"""
# revision identifiers, used by Alembic.
2023-08-29 14:54:30 -07:00
revision = "0010_events_table"
down_revision = "0009_created_by_for_jobs"
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
2023-08-29 14:54:30 -07:00
def upgrade():
### commands auto generated by Alembic - please adjust! ###
2023-08-29 14:54:30 -07:00
op.create_table(
"events",
sa.Column("id", postgresql.UUID(as_uuid=True), nullable=False),
sa.Column("event_type", sa.String(length=255), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("data", postgresql.JSON(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
2023-08-29 14:54:30 -07:00
op.drop_table("events")
### end Alembic commands ###