Commits

Richard Jones committed 6d3ff7b

update for new schema

  • Participants
  • Parent commits e5fae2e

Comments (0)

Files changed (1)

     c.execute('update comments set user_name=%s where user_name=%s', (new, old))
     c.execute('update ratings set user_name=%s where user_name=%s', (new, old))
     c.execute('update comments_journal set submitted_by=%s where submitted_by=%s', (new, old))
+    c.execute('delete from accounts_email where user_id=(select id from accounts_user where username=%s)', (old,))
     c.execute('delete from accounts_user where username=%s', (old,))
 
 def rename_user(store, old, new):
     c.execute('update comments set user_name=%s where user_name=%s', (new, old))
     c.execute('update ratings set user_name=%s where user_name=%s', (new, old))
     c.execute('update comments_journal set submitted_by=%s where submitted_by=%s', (new, old))
-    c.execute('delete from users where name=%s', (old,))
 
 def show_user(store, name):
     user = store.get_user(name)