- add geometry observations (without csearch_path in model.py)
This commit is contained in:
parent
5b78dede0b
commit
86c3c6eb32
3 changed files with 22 additions and 21 deletions
|
@ -34,7 +34,7 @@ def create_pg_session() -> sessionmaker:
|
|||
db_url = os.environ.get("POSTGIS_DBURL")
|
||||
engine = create_engine(
|
||||
"postgresql+psycopg2://" + db_user + ":" + db_password + "@" + db_url,
|
||||
connect_args={'options': f'-csearch_path={dbschema}'},
|
||||
# connect_args={'options': f'-csearch_path={dbschema}'},
|
||||
isolation_level="READ UNCOMMITTED")
|
||||
session_maker = sessionmaker(bind=engine)
|
||||
_session = session_maker()
|
||||
|
@ -190,7 +190,7 @@ class Observation(Base):
|
|||
value_identifier = Column('value_identifier', String)
|
||||
value_quantity = Column('value_quantity', Numeric(20, 10), nullable=True)
|
||||
value_text = Column('value_text', String, nullable=True)
|
||||
value_geometry = Column(Geometry(geometry_type='POLYGON', srid=4326, dimension=3), nullable=True)
|
||||
value_geometry = Column(Geometry(geometry_type='POINTZ', srid=4326, dimension=3), nullable=True)
|
||||
|
||||
fk_dataset_id = Column(Integer, ForeignKey(
|
||||
'gba.dataset.dataset_id'), nullable=False)
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue