]> git.decadent.org.uk Git - dak.git/blobdiff - dak/dakdb/update17.py
Merge commit 'stew/contents' into merge
[dak.git] / dak / dakdb / update17.py
old mode 100644 (file)
new mode 100755 (executable)
index 0d7efa9..c4e0f24
@@ -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()