]> git.decadent.org.uk Git - dak.git/blobdiff - dak/dakdb/update17.py
merge from ftp-master
[dak.git] / dak / dakdb / update17.py
old mode 100644 (file)
new mode 100755 (executable)
index 0d7efa9..beca942
@@ -44,7 +44,7 @@ def do_update(self):
         file text,
         binary_id integer,
         UNIQUE(file,binary_id))""" )
-        
+
         c.execute("""ALTER TABLE ONLY bin_contents
         ADD CONSTRAINT bin_contents_bin_fkey
         FOREIGN KEY (binary_id) REFERENCES binaries(id)
@@ -52,6 +52,10 @@ def do_update(self):
 
         c.execute("""CREATE INDEX ind_bin_contents_binary ON bin_contents(binary_id);""" )
 
+        c.execute("GRANT ALL ON bin_contents TO ftpmaster;")
+        c.execute("GRANT SELECT ON bin_contents TO public;")
+        c.execute("UPDATE config SET value = '17' WHERE name = 'db_revision'")
+
         self.db.commit()
 
     except psycopg2.ProgrammingError, msg: