UPDATE Filename SET Name='' WHERE Name=' ';
-ALTER TABLE file ALTER COLUMN filenameid SET integer;
+alter table file alter column filenameid rename to filenameid-old;
+alter table file add column filenameid integer;
+update file set filenameid = filenameid-old;
+alter table file alter column filenameid set not null;
+alter table file drop column filenameid-old;
DELETE FROM Version;
INSERT INTO Version (VersionId) VALUES (8);
create index file_filenameid_idx on file(filenameid);
create index file_jpfid_idx on file (jobid, pathid, filenameid);
+create table CDImages
+(
+ MediaId integer not null,
+ LastBurn timestamp without time zone not null,
+ primary key (MediaId)
+);
+
+vacuum;
+
END-OF-DATA
then
echo "Update of Bacula PostgreSQL tables succeeded."