Skip to content

Commit

Permalink
bug 757276 - only load citext if --no-schema is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmer committed Jun 21, 2012
1 parent b7a53c7 commit d8d7fa3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions socorro/external/postgresql/setupdb_app.py
Expand Up @@ -170,12 +170,6 @@ def main(self):
db.execute('CREATE LANGUAGE "%s"' % lang,
['language "%s" already exists' % lang])

if re.match(r'9\.0[.*]', db_version):
with open(self.citext) as f:
db.execute(f.read())
elif re.match(r'9\.1[.*]', db_version):
db.execute('CREATE EXTENSION citext')

if not self.no_schema:
with open('sql/schema.sql') as f:
db.execute(f.read(), ['schema "pgx_diag" already exists'])
Expand All @@ -186,6 +180,12 @@ def main(self):
db.execute(
'ALTER DATABASE %s OWNER TO breakpad_rw' %
self.database_name)
if re.match(r'9\.0[.*]', db_version):
with open(self.citext) as f:
db.execute(f.read())
elif re.match(r'9\.1[.*]', db_version):
db.execute('CREATE EXTENSION citext')


return 0

Expand Down

0 comments on commit d8d7fa3

Please sign in to comment.