mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 22:11:01 +08:00
badges-stg: update datanommer.models hotfix
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user