diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-09 15:23:35 +0200 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-09 15:23:35 +0200 |
commit | fdca71c46250576fe22e3347349fcf55a2e24cc6 (patch) | |
tree | 041b4853594de7d6d69414d666ce4ca451789308 | |
parent | 8e968a13c1cea8e39700149709c823762a221b1a (diff) |
What is good
-rw-r--r-- | alembic/env.py | 11 | ||||
-rw-r--r-- | app/database.py | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/alembic/env.py b/alembic/env.py index acb3a7a..3a90171 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -12,9 +12,14 @@ from app.config import settings # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config -config.set_main_option("sqlalchemy.url", f'postgresql+psycopg2://{settings.database_username}:\ - {settings.database_password}@{settings.database_hostname}:{settings.database_port}\ - /{settings.database_name}') + +#config.set_main_option("sqlalchemy.url", f'postgresql+psycopg2://{settings.database_username}:\ +# {settings.database_password}@{settings.database_hostname}:{settings.database_port}\ +# /{settings.database_name}') + +config.set_main_option("sqlalchemy.url", f'postgresql+psycopg2://zgziodukncnnof:\ + bb1176f2961766e2d5edf439b0889f1cbb52288983ea073e94ef387ddb3e5d59@\ + ec2-18-215-8-186.compute-1.amazonaws.com:5432/dfhqvfedeess9u') # Interpret the config file for Python logging. # This line sets up loggers basically. diff --git a/app/database.py b/app/database.py index 86bd085..609d84b 100644 --- a/app/database.py +++ b/app/database.py @@ -7,7 +7,7 @@ import psycopg2 #Library to connect to postgres from .config import settings #SQLALCHEMY_DATABASE_URL = f'postgresql://{settings.database_username}:{settings.database_password}@{settings.database_hostname}:{settings.database_port}/{settings.database_name}' -SQLALCHEMY_DATABASE_URL = "postgresql://zgziodukncnnof:bb1176f2961766e2d5edf439b0889f1cbb52288983ea073e94ef387ddb3e5d59@ec2-18-215-8-186.compute-1.amazonaws.com:5432/dfhqvfedeess9u" +SQLALCHEMY_DATABASE_URL = 'postgresql://zgziodukncnnof:bb1176f2961766e2d5edf439b0889f1cbb52288983ea073e94ef387ddb3e5d59@ec2-18-215-8-186.compute-1.amazonaws.com:5432/dfhqvfedeess9u' engine = create_engine(SQLALCHEMY_DATABASE_URL) |