feat(backend): add video_url and video_position to properties
- Model: video_url VARCHAR(512) nullable, video_position VARCHAR(20) default 'section' - Migration: k3l4m5n6o7p8_add_video_to_properties - Admin route: expose/accept video_url (sanitize empty->NULL) and video_position - Public schema: PropertyDetailOut exposes both fields
This commit is contained in:
parent
7a53865408
commit
d363a09f36
4 changed files with 40 additions and 1 deletions
|
|
@ -0,0 +1,26 @@
|
|||
"""add video to properties
|
||||
|
||||
Revision ID: k3l4m5n6o7p8
|
||||
Revises: j2k3l4m5n6o7
|
||||
Create Date: 2026-04-22
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = 'k3l4m5n6o7p8'
|
||||
down_revision = 'j2k3l4m5n6o7'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column('properties',
|
||||
sa.Column('video_url', sa.String(512), nullable=True))
|
||||
op.add_column('properties',
|
||||
sa.Column('video_position', sa.String(20),
|
||||
nullable=False, server_default='section'))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column('properties', 'video_position')
|
||||
op.drop_column('properties', 'video_url')
|
||||
Loading…
Add table
Add a link
Reference in a new issue