Skip to content

Commit

Permalink
Migrations: Also check for the presence of pootle_app_pootleprofile t…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
jleclanche committed Jul 1, 2014
1 parent 0234e8d commit 354318c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def forwards(self, orm):
keep_default=False)
# Check if we have old data to import
columns = connection.introspection.get_table_description(connection.cursor(), "pootle_app_permissionset")
if "profile_id" in [f[0] for f in columns]:
if "profile_id" in [f[0] for f in columns] and "pootle_app_pootleprofile" in connection.introspection.table_names():
print("Migrating PermissionSet Profile data to User. This may take a while.")
db.execute("""UPDATE pootle_app_permissionset SET user_id =
(select pootle_app_pootleprofile.user_id FROM pootle_app_pootleprofile
Expand Down

0 comments on commit 354318c

Please sign in to comment.