mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-10-30 01:32:23 +00:00
Revert "Make current migrations work with postgresql"
This reverts commit 9b9f3731f6.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user