equal
deleted
inserted
replaced
106 FROM users |
106 FROM users |
107 LEFT JOIN domains USING (gid) |
107 LEFT JOIN domains USING (gid) |
108 LEFT JOIN maillocation USING (mid)""") |
108 LEFT JOIN maillocation USING (mid)""") |
109 dbh.commit() |
109 dbh.commit() |
110 |
110 |
111 # Update VIEW dovecot_user |
111 # Replace VIEW dovecot_user |
|
112 dbc.execute("DROP VIEW dovecot_user") |
|
113 dbh.commit() |
112 dbc.execute("""CREATE OR REPLACE VIEW dovecot_user AS |
114 dbc.execute("""CREATE OR REPLACE VIEW dovecot_user AS |
113 SELECT local_part || '@' || domains.domainname AS userid, |
115 SELECT local_part || '@' || domains.domainname AS userid, |
114 domains.domaindir || '/' || uid AS home, uid, gid |
116 uid, gid, domains.domaindir || '/' || uid AS home, |
|
117 '~/' || maillocation.maillocation AS mail |
115 FROM users |
118 FROM users |
116 LEFT JOIN domains USING (gid)""") |
119 LEFT JOIN domains USING (gid) |
|
120 LEFT JOIN maillocation USING (mid);""") |
117 dbh.commit() |
121 dbh.commit() |
118 |
122 |
119 # fix table users (Part II) |
123 # fix table users (Part II) |
120 dbc.execute("ALTER TABLE users DROP home") |
124 dbc.execute("ALTER TABLE users DROP home") |
121 dbh.commit() |
125 dbh.commit() |