forked from fwenzel/reporter
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added happy/sad info to clusters (SCHEMA CHANGE) - Generate distinct clusters for happy/sad even for 'both' search setting. - Added migrations for sites. Bug 587588: - Fixed foreign key integrity fail bug when running generate_sites (SCHEMA CHANGE) Bug 586915: - Added Cluster for last day in addition to last week and latest beta Allow output of sites directly to a SQL file without writing to DB first.
- Loading branch information
Showing
6 changed files
with
223 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import manage | ||
from django.conf import settings | ||
|
||
def db_command(name): | ||
config = settings.DATABASES[name] | ||
config['HOST'] = config.get('HOST', 'localhost') | ||
config['PORT'] = config.get('PORT', '3306') | ||
|
||
if not config['HOST'] or config['HOST'].endswith('.sock'): | ||
""" Oh you meant 'localhost'! """ | ||
config['HOST'] = 'localhost' | ||
|
||
s = 'mysql --silent {NAME} -h{HOST} -u{USER}' | ||
|
||
if config['PASSWORD']: | ||
s += ' -p{PASSWORD}' | ||
else: | ||
del config['PASSWORD'] | ||
if config['PORT']: | ||
s += ' -P{PORT}' | ||
else: | ||
del config['PORT'] | ||
|
||
return s.format(**config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,8 @@ | ||
import sys | ||
import os | ||
from os.path import dirname, abspath | ||
|
||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
sys.path.insert(0, dirname(dirname(abspath(__file__)))) | ||
from migrations import db_command | ||
|
||
# Set up zamboni. | ||
import manage | ||
from django.conf import settings | ||
|
||
config = settings.DATABASES['default'] | ||
config['HOST'] = config.get('HOST', 'localhost') | ||
config['PORT'] = config.get('PORT', '3306') | ||
|
||
if not config['HOST'] or config['HOST'].endswith('.sock'): | ||
""" Oh you meant 'localhost'! """ | ||
config['HOST'] = 'localhost' | ||
|
||
s = 'mysql --silent {NAME} -h{HOST} -u{USER}' | ||
|
||
if config['PASSWORD']: | ||
s += ' -p{PASSWORD}' | ||
else: | ||
del config['PASSWORD'] | ||
if config['PORT']: | ||
s += ' -P{PORT}' | ||
else: | ||
del config['PORT'] | ||
|
||
db = s.format(**config) | ||
db = db_command('default') | ||
table = 'schema_version' |
Oops, something went wrong.