From 7aeadd1c59a929ffc5361a157c6bf9ad33dd2712 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 13 Nov 2023 17:52:16 +0100 Subject: [PATCH] Add Price.owner field --- ...table.py => 20231112_1827_43571a31006d_create_price_table.py} | 1 + app/models.py | 1 + 2 files changed, 2 insertions(+) rename alembic/versions/{43571a31006d_create_price_table.py => 20231112_1827_43571a31006d_create_price_table.py} (97%) diff --git a/alembic/versions/43571a31006d_create_price_table.py b/alembic/versions/20231112_1827_43571a31006d_create_price_table.py similarity index 97% rename from alembic/versions/43571a31006d_create_price_table.py rename to alembic/versions/20231112_1827_43571a31006d_create_price_table.py index 30764ff7..8885acea 100644 --- a/alembic/versions/43571a31006d_create_price_table.py +++ b/alembic/versions/20231112_1827_43571a31006d_create_price_table.py @@ -31,6 +31,7 @@ def upgrade() -> None: sa.Column('location_osm_id', sa.BigInteger(), nullable=True), sa.Column('location_osm_type', sa.String(length=255), nullable=True), sa.Column('date', sa.Date(), nullable=True), + sa.Column('owner', sa.String(), nullable=True), sa.Column('created', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True), sa.PrimaryKeyConstraint('id'), ) diff --git a/app/models.py b/app/models.py index d597479b..f47eb82a 100644 --- a/app/models.py +++ b/app/models.py @@ -38,6 +38,7 @@ class Price(Base): location_osm_type = Column(ChoiceType(PriceLocationOSMType)) date = Column(Date) + owner = Column(String) created = Column(DateTime(timezone=True), server_default=func.now())