X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fdakdb%2Fupdate4.py;h=f707a31150df211fd588816ed9002de165b77776;hb=1483a68353fe374254379f4560cc245fbf2523d4;hp=31160766cbf37595d21e2eff4a3c00dab24ebe7f;hpb=f71ac27c75a8ab5185508491e97bc6f237772aa6;p=dak.git diff --git a/dak/dakdb/update4.py b/dak/dakdb/update4.py index 31160766..f707a311 100644 --- a/dak/dakdb/update4.py +++ b/dak/dakdb/update4.py @@ -56,6 +56,14 @@ def do_update(self): filename int4 not null references content_file_names(id) on delete cascade );""") + c.execute("""CREATE TABLE temp_content_associations ( + id serial not null, + package text not null, + version debversion not null, + filepath int4 not null references content_file_paths(id) on delete cascade, + filename int4 not null references content_file_names(id) on delete cascade + );""") + c.execute("""CREATE FUNCTION comma_concat(text, text) RETURNS text AS $_$select case WHEN $2 is null or $2 = '' THEN $1 @@ -71,6 +79,8 @@ def do_update(self): INITCOND = '' );""") + c.execute( "CREATE INDEX content_assocaitions_binary ON content_associations(binary_pkg)" ) + c.execute("UPDATE config SET value = '2' WHERE name = 'db_revision'") self.db.commit()