Browse Source

Fix sqlite query for php_version

master
Prabuddha Chakraborty 9 years ago
parent
commit
ef5f283dfd
  1. 4
      ee/cli/plugins/sitedb.py
  2. 4
      install

4
ee/cli/plugins/sitedb.py

@ -19,7 +19,7 @@ def addNewSite(self, site, stype, cache, path,
try:
newRec = SiteDB(site, stype, cache, path, enabled, ssl, fs, db,
db_name, db_user, db_password, db_host, hhvm,
pagespeed,php_version)
pagespeed, php_version)
db_session.add(newRec)
db_session.commit()
except Exception as e:
@ -42,7 +42,7 @@ def getSiteInfo(self, site):
def updateSiteInfo(self, site, stype='', cache='', webroot='',
enabled=True, ssl=False, fs='', db='', db_name=None,
db_user=None, db_password=None, db_host=None, hhvm=None,
pagespeed=None,php_version='5.5'):
pagespeed=None, php_version='5.5'):
"""updates site record in database"""
try:
q = SiteDB.query.filter(SiteDB.sitename == site).first()

4
install

@ -121,7 +121,8 @@ function ee_sync_db()
db_password VARCHAR,
db_host VARCHAR,
is_hhvm INT INT DEFAULT '0',
is_pagespeed INT INT DEFAULT '0'
is_pagespeed INT INT DEFAULT '0',
php_version VARCHAR
);" | sqlite3 /var/lib/ee/ee.db
# Check site is enable/live or disable
@ -213,6 +214,7 @@ function ee_sync_db()
echo "ALTER TABLE sites ADD COLUMN db_host varchar;" | sqlite3 /var/lib/ee/ee.db
echo "ALTER TABLE sites ADD COLUMN is_hhvm INT DEFAULT '0';" | sqlite3 /var/lib/ee/ee.db
echo "ALTER TABLE sites ADD COLUMN is_pagespeed INT DEFAULT '0';" | sqlite3 /var/lib/ee/ee.db
echo "ALTER TABLE sites ADD COLUMN php_version varchar DEFAULT '5.5';" | sqlite3 /var/lib/ee/ee.db
fi
}

Loading…
Cancel
Save