Revert "Make current migrations work with postgresql"

This reverts commit 9b9f3731f6.
This commit is contained in:
kaiyou
2018-12-10 15:03:12 +01:00
parent 76925e82f3
commit a881a1a839
6 changed files with 18 additions and 26 deletions

View File

@@ -80,17 +80,14 @@ class ConfigManager(dict):
key: os.environ.get(key, value)
for key, value in DEFAULT_CONFIG.items()
})
if self.config['SQL_FLAVOR'] != 'sqlite'
self.setsql()
app.config = self
def setsql(self):
if not self.config['DB_PW']:
def setsql(self)
if not self.config['DB_PW']
self.config['DB_PW'] = self.config['SECRET_KEY']
self.config['SQLALCHEMY_DATABASE_URI'] = '{driver}://{user}:{pw}@{url}/{db}'.format(
driver=self.config['DB_FLAVOR'],
user=self.config['DB_USER'],
pw=self.config['DB_PW'],
url=self.config['DB_URL'],
db=self.config['DB_NAME']
)
self.config['SQLALCHEMY_DATABASE_URI'] = '{driver}://{user}:{pw}@{url}/{db}'.format(driver=DB_FLAVOR,user=DB_USER,pw=DB_PW,url=DB_URL,db=DB_NAME)
def setdefault(self, key, value):
if key not in self.config: