Skip to content

Commit

Permalink
Tried to change DB_URL again.
Browse files Browse the repository at this point in the history
  • Loading branch information
evankirkiles committed Dec 16, 2022
1 parent ed1b547 commit 9c46a0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions psiturk/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
# internally use `mysql+pymysql://` so sqlalchemy talks to
# the pymysql package
DATABASE = DATABASE.replace('mysql://', 'mysql+pymysql://')
if 'postgres://' in DATABASE.lower():
# internally use `mysql+pymysql://` so sqlalchemy talks to
# the pymysql package
DATABASE = DATABASE.replace('postgres://', 'postgresql://')

engine = create_engine(DATABASE, echo=False, pool_recycle=3600)
db_session = scoped_session(sessionmaker(autocommit=False,
Expand Down

0 comments on commit 9c46a0b

Please sign in to comment.