]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix SQLite update script and add upgrade event
authorEric Bollengier <eric@baculasystems.com>
Tue, 29 Mar 2022 06:55:16 +0000 (08:55 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 29 Mar 2022 06:55:16 +0000 (08:55 +0200)
bacula/src/cats/update_mysql_tables.in
bacula/src/cats/update_postgresql_tables.in
bacula/src/cats/update_sqlite3_tables.in

index 47721a2318451689688666ed21e272bb586c2087..dcbe04f251c567add35e7d6d5d895219c54f968a 100644 (file)
@@ -540,6 +540,8 @@ USE ${db_name};
 ALTER TABLE Object ADD ObjectStatus BINARY(1) DEFAULT 'U';
 ALTER TABLE Object ADD ObjectCount  INTEGER UNSIGNED DEFAULT 1;
 create index object_status_idx on Object  (ObjectStatus);
+INSERT INTO Events (EventsCode, EventsType, EventsTime, EventsDaemon, EventsSource, EventsRef, EventsText) VALUES
+  ('DU0001', 'catalog_update', NOW(), '*SHELL*', 'update_bacula_tables', 'pid$$', 'Catalog schema was updated to 1024');
 UPDATE Version SET VersionId=1024;
 END-OF-DATA
     then
index 691ac79e686f4f90f7d5c4cc98b1e7ebb2a62846..d0b64bf97daa19c8bbd72e208c2804281ff08877 100644 (file)
@@ -591,6 +591,8 @@ begin;
 ALTER TABLE Object ADD COLUMN ObjectStatus char(1) default 'U';
 ALTER TABLE Object ADD COLUMN ObjectCount integer default 1;
 create index object_status_idx on Object (ObjectStatus);
+INSERT INTO Events (EventsCode, EventsType, EventsTime, EventsDaemon, EventsSource, EventsRef, EventsText) VALUES
+  ('DU0001', 'catalog_update', NOW(), '*SHELL*', 'update_bacula_tables', 'pid$$', 'Catalog schema was updated to 1024');
 UPDATE Version SET VersionId=1024;
 commit;
 END-OF-DATA
index 5d86961c77037907ee5c653b6d377fa7f15b1b58..10847260feab0557ccc5620068ab933881e79513 100644 (file)
@@ -477,7 +477,7 @@ begin;
 ALTER TABLE Object ADD COLUMN ObjectCategory text not null;
 create index object_category_idx on Object  (ObjectCategory);
 INSERT INTO Events (EventsCode, EventsType, EventsTime, EventsDaemon, EventsSource, EventsRef, EventsText)
-  VALUES ('DU0001', 'catalog_update', NOW(), '*SHELL*', 'update_bacula_tables', 'pid$$', 'Catalog schema was updated to 1023');
+  VALUES ('DU0001', 'catalog_update', strftime('%Y-%m-%d %H-%M-%S','now'), '*SHELL*', 'update_bacula_tables', 'pid$$', 'Catalog schema was updated to 1023');
 UPDATE Version SET VersionId=1023;
 commit;
 END-OF-DATA
@@ -496,6 +496,8 @@ begin;
 ALTER TABLE Object ADD COLUMN ObjectStatus char(1) default 'U';
 ALTER TABLE Object ADD COLUMN ObjectCount integer default 1;
 create index object_status_idx on Object  (ObjectStatus);
+INSERT INTO Events (EventsCode, EventsType, EventsTime, EventsDaemon, EventsSource, EventsRef, EventsText)
+  VALUES ('DU0001', 'catalog_update', strftime('%Y-%m-%d %H-%M-%S','now'), '*SHELL*', 'update_bacula_tables', 'pid$$', 'Catalog schema was updated to 1024');
 UPDATE Version SET VersionId=1024;
 commit;
 END-OF-DATA