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."
12 if $bindir/psql $* -f - <<END-OF-DATA
15 ALTER TABLE media ADD COLUMN volparts integer;
16 UPDATE media SET volparts=0;
17 ALTER TABLE media ALTER COLUMN volparts SET NOT NULL;
23 echo "Update of Bacula PostgreSQL tables succeeded."
25 echo "Update of Bacula PostgreSQL tables failed."