summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_db_maintenance.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-29 17:53:33 +0200
committerMattia Rizzolo <mattia@mapreri.org>2015-03-29 17:53:33 +0200
commit68eefd759bd6a128ac9844582405cf2aa2f76c97 (patch)
tree085902ac1aced60cbb53586c2a7da0a099fc1af2 /bin/reproducible_db_maintenance.py
parent4f16fda1bd66cbff8eea2a33ec72484825c9a55a (diff)
downloadjenkins.debian.net-68eefd759bd6a128ac9844582405cf2aa2f76c97.tar.xz
reproducible: store notes in the database. This is a initial work. It does nothing other than picking the yaml files and store it's content on the db
Diffstat (limited to 'bin/reproducible_db_maintenance.py')
-rwxr-xr-xbin/reproducible_db_maintenance.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py
index 5b82f5c4..17740398 100755
--- a/bin/reproducible_db_maintenance.py
+++ b/bin/reproducible_db_maintenance.py
@@ -339,6 +339,21 @@ schema_updates = {
'UPDATE stats_builds_age SET suite = "unstable" WHERE suite = "sid"',
'UPDATE stats_meta_pkg_state SET suite = "unstable" WHERE suite = "sid"',
'INSERT INTO rb_schema VALUES ("9", "' + now + '")'],
+ 10: [ # add the notes and issues tables
+ '''CREATE TABLE notes (
+ package_id INTEGER,
+ version TEXT NOT NULL,
+ issues TEXT,
+ bugs TEXT,
+ comments TEXT,
+ PRIMARY KEY (package_id),
+ FOREIGN KEY(package_id) REFERENCES sources(id))''',
+ '''CREATE TABLE issues (
+ name TEXT NOT NULL,
+ description TEXT NOT NULL,
+ url TEXT,
+ PRIMARY KEY (name))''',
+ 'INSERT INTO rb_schema VALUES ("10", "' + now + '")'],
}