This repository has been archived on 2022-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
it-volunteers-for-peace/alembic/versions/2450600b8eaf_add_project_contacts.py

31 lines
653 B
Python
Raw Normal View History

2022-10-17 10:56:54 +00:00
"""add project contacts
Revision ID: 2450600b8eaf
Revises: 9b42b5289e30
Create Date: 2022-10-17 12:46:59.115251
"""
from alembic import op
from sqlalchemy.sql import text
# revision identifiers, used by Alembic.
revision = '2450600b8eaf'
down_revision = '9b42b5289e30'
branch_labels = None
depends_on = None
def upgrade() -> None:
conn = op.get_bind()
add_contacts_query = "ALTER TABLE projects ADD COLUMN contacts varchar(50)"
conn.execute(text(add_contacts_query))
def downgrade() -> None:
conn = op.get_bind()
2022-10-17 11:07:16 +00:00
drop_contacts_query = "ALTER TABLE projects DROP COLUMN contacts"
2022-10-17 10:56:54 +00:00
conn.execute(text(drop_contacts_query))