mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
meeting consent vibe
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"""add meeting consent table
|
||||
|
||||
Revision ID: 20250617140003
|
||||
Revises: f819277e5169
|
||||
Create Date: 2025-06-17 14:00:03.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "20250617140003"
|
||||
down_revision: Union[str, None] = "f819277e5169"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# Create meeting_consent table
|
||||
op.create_table(
|
||||
'meeting_consent',
|
||||
sa.Column('id', sa.String(), nullable=False),
|
||||
sa.Column('meeting_id', sa.String(), nullable=False),
|
||||
sa.Column('user_identifier', sa.String(), nullable=False),
|
||||
sa.Column('consent_given', sa.Boolean(), nullable=False),
|
||||
sa.Column('consent_timestamp', sa.DateTime(), nullable=False),
|
||||
sa.Column('user_agent', sa.String(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(['meeting_id'], ['meeting.id']),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# Drop meeting_consent table
|
||||
op.drop_table('meeting_consent')
|
||||
@@ -0,0 +1,32 @@
|
||||
"""make user_identifier optional in meeting_consent
|
||||
|
||||
Revision ID: 38e116c82385
|
||||
Revises: 20250617140003
|
||||
Create Date: 2025-06-17 15:23:41.346980
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '38e116c82385'
|
||||
down_revision: Union[str, None] = '20250617140003'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# Make user_identifier column nullable
|
||||
op.alter_column('meeting_consent', 'user_identifier',
|
||||
existing_type=sa.String(),
|
||||
nullable=True)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# Revert user_identifier back to non-nullable
|
||||
op.alter_column('meeting_consent', 'user_identifier',
|
||||
existing_type=sa.String(),
|
||||
nullable=False)
|
||||
Reference in New Issue
Block a user