pgsql/create_tables.pgsql
branchv0.6.x
changeset 388 dd95ed5bc9d2
parent 387 05dc4e1f8dff
child 391 8217ddd5220d
--- a/pgsql/create_tables.pgsql	Tue Feb 08 13:43:35 2011 +0000
+++ b/pgsql/create_tables.pgsql	Tue Feb 08 18:04:07 2011 +0000
@@ -203,13 +203,15 @@
            (SELECT count(gid)
               FROM domain_name
              WHERE domain_name.gid = domain_data.gid
-               AND NOT domain_name.is_primary) AS aliasdomains
+               AND NOT domain_name.is_primary) AS aliasdomains,
+           bytes, messages
       FROM domain_data
            LEFT JOIN domain_name USING (gid)
+           LEFT JOIN quotalimit USING (qid)
            LEFT JOIN transport USING (tid)
            LEFT JOIN users USING (gid)
      WHERE domain_name.is_primary
-  GROUP BY gid, domainname, transport, domaindir;
+  GROUP BY gid, domainname, transport, domaindir, bytes, messages;
 
 
 CREATE LANGUAGE plpgsql;