3 # Shell script to update PostgreSQL tables from version 2.0.0 to 3.0.0 or higher
6 echo "This script will update a Bacula PostgreSQL database from version 10 to 11"
7 echo " which is needed to convert from Bacula version 2.0.0 to 3.0.x or higher"
12 if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
14 -- Create a table like Job for long term statistics
15 CREATE TABLE jobstat (LIKE job);
17 UPDATE version SET versionid=11;
23 echo "Update of Bacula PostgreSQL tables succeeded."
25 echo "Update of Bacula PostgreSQL tables failed."