API: use of PostgreSQL instead of MySQL

API: use of PostgreSQL instead of MySQL
This commit is contained in:
SamR1
2018-01-07 18:11:19 +01:00
parent 81b1370b5e
commit a8faabddc3
6 changed files with 11 additions and 8 deletions

5
mpwo_api/db/mpwo.sql Normal file
View File

@ -0,0 +1,5 @@
CREATE DATABASE mpwo;
CREATE DATABASE mpwo_test;
CREATE USER mpwo WITH PASSWORD 'mpwo';
GRANT ALL PRIVILEGES ON DATABASE mpwo TO mpwo;
GRANT ALL PRIVILEGES ON DATABASE mpwo_test TO mpwo;

View File

@ -20,7 +20,7 @@ class DevelopmentConfig(BaseConfig):
"""Development configuration"""
DEBUG = True
SQLALCHEMY_DATABASE_URI = \
'mysql+mysqldb://mpwo:mpwo@127.0.0.1:3306/mpwo'
os.environ.get('DATABASE_URL')
SECRET_KEY = 'development key'
USERNAME = 'admin'
PASSWORD = 'default'
@ -31,7 +31,7 @@ class TestingConfig(BaseConfig):
"""Development configuration"""
DEBUG = True
SQLALCHEMY_DATABASE_URI = \
'mysql+mysqldb://mpwo:mpwo@127.0.0.1:3306/mpwo_test'
os.environ.get('DATABASE_TEST_URL')
SECRET_KEY = 'test key'
USERNAME = 'admin'
PASSWORD = 'default'

View File

@ -14,6 +14,7 @@ Jinja2==2.10
MarkupSafe==1.0
mccabe==0.6.1
mysqlclient==1.3.12
psycopg2==2.7.3.2
pycodestyle==2.3.1
pycparser==2.18
pyflakes==1.6.0