<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,13 +8,13 @@ from HTMLParser import HTMLParseError
 output_filename = '/tmp/importfile.dat'
 output_file = codecs.open(output_filename, 'w', 'utf-8', errors='strict')
 
-my_conn = my.connect(host=&quot;localhost&quot;, user=&quot;freesound&quot;, passwd=sys.argv[1], db=&quot;freesound&quot;, unix_socket=&quot;/var/mysql/mysql.sock&quot;, use_unicode=False, use_unicode=False)
+my_conn = my.connect(host=&quot;localhost&quot;, user=&quot;freesound_web&quot;, passwd=sys.argv[1], db=&quot;freesound&quot;, use_unicode=False)
 my_curs = my_conn.cursor()
 
 check_user_ids = True
 
 if check_user_ids:
-    ppsql_conn = psycopg2.connect(&quot;dbname='freesound' user='freesound' password='%s'&quot; % sys.argv[1])
+    ppsql_conn = psycopg2.connect(&quot;host='localhost' dbname='freesound' user='freesoundpg' password='%s'&quot; % sys.argv[2])
     ppsql_cur = ppsql_conn.cursor()
     print &quot;getting all valid user ids&quot;
     ppsql_cur.execute(&quot;SELECT id FROM auth_user&quot;)</diff>
      <filename>sandbox/db_conversion/profile.py</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ from text_utils import prepare_for_insert, smart_character_decoding
 output_filename = '/tmp/importfile.dat'
 output_file = codecs.open(output_filename, 'wt', 'utf-8')
 
-my_conn = my.connect(host=&quot;localhost&quot;, user=&quot;freesound&quot;, passwd=sys.argv[1],db=&quot;freesound&quot;, unix_socket=&quot;/var/mysql/mysql.sock&quot;, use_unicode=False)
+my_conn = my.connect(host=&quot;localhost&quot;, user=&quot;freesound_web&quot;, passwd=sys.argv[1],db=&quot;freesound&quot;, use_unicode=False)
 my_curs = my_conn.cursor()
 
 start = 1 # start at one, we don't want the anonymous user!
@@ -25,7 +25,7 @@ while True:
     for row in rows:
         user_id, user_active, username, user_password, user_regdate, user_lastvisit, user_email = row
         
-        if user_id == 16967:
+        if user_id in (16967,1037753,1294123):
             continue
         
         username = smart_character_decoding(username)
@@ -45,20 +45,13 @@ copy auth_user (id, is_active, username, password, date_joined, last_login, emai
 select setval('auth_user_id_seq',(select max(id)+1 from auth_user));
 vacuum analyze auth_user;
 
-create table TEMP_TABLE as select username from auth_user group by username having count(*) &gt; 1;
-delete from auth_user where username in (select username from TEMP_TABLE);
-drop table TEMP_TABLE;
-
-create table TEMP_TABLE as select email from auth_user group by email having count(*) &gt; 1;
-delete from auth_user where email in (select email from TEMP_TABLE) and last_login = '1970-01-01 01:00:00+01';
-drop table TEMP_TABLE;
-
-create table TEMP_TABLE as select lower(username) as username from auth_user group by lower(username) having count(*) &gt; 1;
-delete from auth_user where lower(username) in (select username from TEMP_TABLE) and last_login='1970-01-01 01:00:00+01';
-drop table TEMP_TABLE;
+delete from auth_user where email in (select email from auth_user group by email having count(*) &gt; 1) and last_login = '1970-01-01 01:00:00+01';
+delete from auth_user where is_active = false and upper(username) in (select upper(username) from auth_user group by upper(username) having count(*) &gt; 1);
+delete from auth_user where last_login = '1970-01-01 01:00:00+01' and upper(username) in (select upper(username) from auth_user group by upper(username) having count(*) &gt; 1);
+delete from auth_user where id in (63988, 25491, 64476, 1294123, 898674, 166110, 543349);
 
 update auth_user set is_staff=true, is_superuser=true where username='Bram';
 
 create unique index auth_user_username_upper_key ON auth_user ((upper(username)));
 vacuum analyze auth_user;
-&quot;&quot;&quot; % output_filename
\ No newline at end of file
+&quot;&quot;&quot; % output_filename</diff>
      <filename>sandbox/db_conversion/users.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2b8274e53c53038bb8924263c4216b666ce105d2</id>
    </parent>
  </parents>
  <author>
    <name>bdejong</name>
    <email>bdejong@chiapas.upf.es</email>
  </author>
  <url>http://github.com/bram/freesound/commit/6c297fff0894efbea5244703ed8203efe7b06c7c</url>
  <id>6c297fff0894efbea5244703ed8203efe7b06c7c</id>
  <committed-date>2009-11-06T13:35:11-08:00</committed-date>
  <authored-date>2009-11-06T13:06:50-08:00</authored-date>
  <message>changed the user import and the profile</message>
  <tree>953e1a4fc2c9481d4d3ccb0ba0eec9daf525794d</tree>
  <committer>
    <name>Bram de Jong</name>
    <email>bram.dejong@samplesumo.com</email>
  </committer>
</commit>
