- add hourly cron job for importing piezeometer data for sensor bohrloch1-6
This commit is contained in:
parent
14d3168d0e
commit
b4d7ce40b3
6 changed files with 90 additions and 70 deletions
|
@ -40,12 +40,18 @@ def create_pg_session() -> sessionmaker:
|
|||
# Base.metadata.create_all(engine)
|
||||
return _session
|
||||
|
||||
platform_seq = Sequence('platform_seq', schema="gba") # define sequence explicitly
|
||||
class Platform(Base):
|
||||
""" Platform class """
|
||||
__tablename__ = 'platform'
|
||||
__table_args__ = {"schema": "gba"}
|
||||
|
||||
id = Column('platform_id', Integer, primary_key=True)
|
||||
# id = Column('platform_id', Integer, primary_key=True)
|
||||
id = Column('platform_id',
|
||||
Integer,
|
||||
platform_seq,
|
||||
primary_key=True,
|
||||
server_default=platform_seq.next_value())
|
||||
identifier = Column('identifier', String)
|
||||
sta_identifier = Column('sta_identifier', String)
|
||||
name = Column('name', String)
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue