Skip to content

Commit

Permalink
Merge branch '706-fix-data-migration'
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Mar 27, 2013
2 parents 2bcb32d + 43ddc88 commit cce3602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/migration/versions/067_turn_extras_to_strings.py
Expand Up @@ -7,7 +7,7 @@ def upgrade(migrate_engine):
revision_tables = 'package_extra_revision group_extra_revision'

for table in tables.split():
sql = """select id, value from {table} where substr(value,0,1) = '"' """.format(table=table)
sql = """select id, value from {table} where substr(value,1,1) = '"' """.format(table=table)
results = connection.execute(sql)
for result in results:
id, value = result
Expand All @@ -16,7 +16,7 @@ def upgrade(migrate_engine):
json.loads(value), id)

for table in revision_tables.split():
sql = """select id, revision_id, value from {table} where substr(value,0,1) = '"' """.format(table=table)
sql = """select id, revision_id, value from {table} where substr(value,1,1) = '"' """.format(table=table)

results = connection.execute(sql)
for result in results:
Expand Down

0 comments on commit cce3602

Please sign in to comment.