badges-stg: update datanommer.models hotfix
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
parent
02198b32b3
commit
a09a1c9b4e
2 changed files with 4 additions and 9 deletions
|
@ -39,13 +39,8 @@ from sqlalchemy import (
|
|||
)
|
||||
from sqlalchemy.dialects import postgresql
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from sqlalchemy.orm import (
|
||||
declarative_base,
|
||||
relationship,
|
||||
scoped_session,
|
||||
sessionmaker,
|
||||
validates,
|
||||
)
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import relationship, scoped_session, sessionmaker, validates
|
||||
|
||||
|
||||
try:
|
||||
|
@ -477,7 +472,7 @@ def _setup_hypertable(table_class):
|
|||
event.listen(
|
||||
table_class.__table__,
|
||||
"after_create",
|
||||
DDL(f"SELECT create_hypertable('{table_class.__tablename__}', 'timestamp');"),
|
||||
DDL("SELECT create_hypertable('%s', 'timestamp');" % table_class.__tablename__),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
config = {
|
||||
{% if env == "staging" %}
|
||||
'datanommer.sqlalchemy.url': 'postgresql://{{datanommerDBUser}}:{{datanommerDBPassword}}@db-datanommer.stg.iad2.fedoraproject.org/datanommer',
|
||||
'datanommer.sqlalchemy.url': 'postgresql://{{datanommerDBUser}}:{{datanommerDBPassword}}@db-datanommer.stg.iad2.fedoraproject.org/datanommer2',
|
||||
{% else %}
|
||||
'datanommer.sqlalchemy.url': 'postgresql://{{datanommerDBUser}}:{{datanommerDBPassword}}@db-datanommer/datanommer',
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue