feat: add full project - backend, frontend, docker, specs and configs
This commit is contained in:
parent
b77c7d5a01
commit
e6cb06255b
24489 changed files with 61341 additions and 36 deletions
|
|
@ -0,0 +1,51 @@
|
|||
"""merge heads and add imobiliarias table
|
||||
|
||||
Revision ID: f2a3b4c5d6e7
|
||||
Revises: d0e1f2a3b4c5, e1f2a3b4c5d6
|
||||
Create Date: 2026-04-18 00:00:00.000000
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "f2a3b4c5d6e7"
|
||||
down_revision = ("d0e1f2a3b4c5", "e1f2a3b4c5d6")
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
"imobiliarias",
|
||||
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column("name", sa.String(length=200), nullable=False),
|
||||
sa.Column("logo_url", sa.String(length=512), nullable=True),
|
||||
sa.Column("website", sa.String(length=512), nullable=True),
|
||||
sa.Column("is_active", sa.Boolean(), nullable=False, server_default="true"),
|
||||
sa.Column("display_order", sa.Integer(), nullable=False, server_default="0"),
|
||||
sa.Column(
|
||||
"created_at",
|
||||
sa.DateTime(),
|
||||
nullable=False,
|
||||
server_default=sa.text("now()"),
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
"properties",
|
||||
sa.Column(
|
||||
"imobiliaria_id",
|
||||
sa.Integer(),
|
||||
sa.ForeignKey("imobiliarias.id", ondelete="SET NULL"),
|
||||
nullable=True,
|
||||
),
|
||||
)
|
||||
op.create_index("ix_properties_imobiliaria_id", "properties", ["imobiliaria_id"])
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index("ix_properties_imobiliaria_id", table_name="properties")
|
||||
op.drop_column("properties", "imobiliaria_id")
|
||||
op.drop_table("imobiliarias")
|
||||
Loading…
Add table
Add a link
Reference in a new issue