feat: project consistency
This commit is contained in:
parent
7804816a1a
commit
cb70f17ad5
16 changed files with 572 additions and 219 deletions
|
|
@ -1,34 +0,0 @@
|
|||
"""Contact model changes
|
||||
|
||||
Revision ID: 8132c4b88665
|
||||
Revises: a147965e644e
|
||||
Create Date: 2026-05-25 13:09:22.635058
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '8132c4b88665'
|
||||
down_revision: Union[str, Sequence[str], None] = 'a147965e644e'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('contact', sa.Column('org_id', sa.Integer(), nullable=False))
|
||||
op.create_foreign_key(None, 'contact', 'organisation', ['org_id'], ['id'], ondelete='CASCADE')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint(None, 'contact', type_='foreignkey')
|
||||
op.drop_column('contact', 'org_id')
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue