JoostSijm пре 5 година
родитељ
комит
ce775ac2ed
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      app/models.py
  2. 1 1
      migrations/versions/3760fb81a289_add_factory_location.py

+ 1 - 1
app/models.py

@@ -270,7 +270,7 @@ class FactoryTrack(Base):
 class FactoryLocation(Base):
 class FactoryLocation(Base):
     """Model for factory location"""
     """Model for factory location"""
     __tablename__ = 'factory_location'
     __tablename__ = 'factory_location'
-    factory_id = Column(BigInteger, ForeignKey('factory.id'), primary_key=True)
+    factory_id = Column(Integer, ForeignKey('factory.id'), primary_key=True)
     region_id = Column(Integer, ForeignKey('region.id'), primary_key=True)
     region_id = Column(Integer, ForeignKey('region.id'), primary_key=True)
     from_date_time = Column(DateTime)
     from_date_time = Column(DateTime)
     until_date_time = Column(DateTime)
     until_date_time = Column(DateTime)

+ 1 - 1
migrations/versions/3760fb81a289_add_factory_location.py

@@ -18,7 +18,7 @@ depends_on = None
 
 
 def upgrade():
 def upgrade():
     op.create_table('factory_location',
     op.create_table('factory_location',
-    sa.Column('factory_id', sa.BigInteger(), nullable=False),
+    sa.Column('factory_id', sa.Integer(), nullable=False),
     sa.Column('region_id', sa.Integer(), nullable=False),
     sa.Column('region_id', sa.Integer(), nullable=False),
     sa.Column('from_date_time', sa.DateTime(), nullable=True),
     sa.Column('from_date_time', sa.DateTime(), nullable=True),
     sa.Column('until_date_time', sa.DateTime(), nullable=True),
     sa.Column('until_date_time', sa.DateTime(), nullable=True),