3 # Shell script to update PostgreSQL tables from version 1.34 to 1.35.5
6 echo "This script will update a Bacula PostgreSQL database from version 7 to 8"
7 echo "Depending on the size of your database,"
8 echo "this script may take several minutes to run."
10 bindir=/home/kern/bacula/depkgs/sqlite
12 if $bindir/psql $* -f - <<END-OF-DATA
15 ALTER TABLE Media ADD COLUMN EndFile integer not null default 0;
16 ALTER TABLE Media ADD COLUMN EndBlock integer not null default 0;
18 UPDATE Filename SET Name='' WHERE Name=' ';
21 INSERT INTO Version (VersionId) VALUES (8);
25 MediaId integer not null,
26 LastBurn timestamp without time zone not null,
32 echo "Update of Bacula PostgreSQL tables succeeded."
34 echo "Update of Bacula PostgreSQL tables failed."