X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate17.py;fp=dak%2Fdakdb%2Fupdate17.py;h=c4e0f2458a9dc5e93bb53928b075c3422079a027;hb=6c695061a5552aad04f8959efa510e05588fd063;hp=0d7efa9efec6c77e325aaa4c885e1766477452d4;hpb=778f521cd0cbd2093896c2476738377dc58e41b7;p=dak.git diff --git a/dak/dakdb/update17.py b/dak/dakdb/update17.py old mode 100644 new mode 100755 index 0d7efa9e..c4e0f245 --- 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,7 +52,8 @@ def do_update(self): c.execute("""CREATE INDEX ind_bin_contents_binary ON bin_contents(binary_id);""" ) - self.db.commit() + c.execute("UPDATE config SET value = '17' WHERE name = 'db_revision'") + self.db.commit() except psycopg2.ProgrammingError, msg: self.db.rollback()