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.dialects import postgresql
|
||||||
from sqlalchemy.exc import IntegrityError
|
from sqlalchemy.exc import IntegrityError
|
||||||
from sqlalchemy.orm import (
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
declarative_base,
|
from sqlalchemy.orm import relationship, scoped_session, sessionmaker, validates
|
||||||
relationship,
|
|
||||||
scoped_session,
|
|
||||||
sessionmaker,
|
|
||||||
validates,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -477,7 +472,7 @@ def _setup_hypertable(table_class):
|
||||||
event.listen(
|
event.listen(
|
||||||
table_class.__table__,
|
table_class.__table__,
|
||||||
"after_create",
|
"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 = {
|
config = {
|
||||||
{% if env == "staging" %}
|
{% 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 %}
|
{% else %}
|
||||||
'datanommer.sqlalchemy.url': 'postgresql://{{datanommerDBUser}}:{{datanommerDBPassword}}@db-datanommer/datanommer',
|
'datanommer.sqlalchemy.url': 'postgresql://{{datanommerDBUser}}:{{datanommerDBPassword}}@db-datanommer/datanommer',
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue