X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate17.py;h=beca9425020e6b3df6004eccdf6dea1299a54541;hb=3b50b545815298b77b8eb68930acb6fde01ea4d4;hp=0d7efa9efec6c77e325aaa4c885e1766477452d4;hpb=274fdac9a30c88bd6df70bd4e30b6a684775415a;p=dak.git diff --git a/dak/dakdb/update17.py b/dak/dakdb/update17.py old mode 100644 new mode 100755 index 0d7efa9e..beca9425 --- a/dak/dakdb/update17.py +++ b/dak/dakdb/update17.py @@ -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: