diff --git a/alembic/versions/20250327_134027_e664639a_create_healthcheck.py b/alembic/versions/20250327_134027_e664639a_create_healthcheck.py new file mode 100644 index 0000000..233e15e --- /dev/null +++ b/alembic/versions/20250327_134027_e664639a_create_healthcheck.py @@ -0,0 +1,30 @@ +"""create healthchecks table + +Revision ID: d4c3b2a190ec +Revises: 0001 +Create Date: 2023-05-15 11:20:39.624926 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects.postgresql import UUID +import uuid + +# revision identifiers, used by Alembic. +revision = 'd4c3b2a190ec' +down_revision = '0001' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'healthchecks', + sa.Column('id', UUID(as_uuid=True), primary_key=True, default=uuid.uuid4), + sa.Column('created_at', sa.DateTime, server_default=sa.func.now(), nullable=False), + sa.Column('updated_at', sa.DateTime, server_default=sa.func.now(), nullable=False, onupdate=sa.func.now()) + ) + + +def downgrade(): + op.drop_table('healthchecks') \ No newline at end of file