Also update docs/README.first to advise to run dak update-db
before dak init-db.
Signed-off-by: Raphael Hertzog <hertzog@debian.org>
try:
c = self.db.cursor()
- c.execute("DROP FUNCTION versioncmp(text, text);")
+ try:
+ # This might not exist on a fresh install, so don't fail
+ # needlessly
+ c.execute("DROP FUNCTION versioncmp(text, text);")
+ except:
+ pass
c.execute("UPDATE config SET value = '3' WHERE name = 'db_revision'")
self.db.commit()
print "Fixing bin_assoc_by_arch view"
try:
c = self.db.cursor()
- c.execute("DROP VIEW bin_assoc_by_arch")
c.execute("""CREATE OR REPLACE VIEW bin_assoc_by_arch AS
SELECT ba.suite, ba.bin, a.id AS arch
which are needed for this. After changing all occurences of "projectb"
to the name of your database (as defined in DB::Name) you can run:
psql <DB::Name> < init_pool.sql
+ * Run 'dak update-db' to upgrade the database schema.
* Run 'dak init-db': it will populate your database with the values from
dak.conf and apt.conf.
* Run 'psql <DB::Name> < add_constraints.sql'.