]> git.sur5r.net Git - bacula/bacula/commitdiff
Update database scripts to include CDImages table for bimagemgr.
authorScott Barninger <scott@barninger.com>
Sat, 16 Oct 2004 11:30:39 +0000 (11:30 +0000)
committerScott Barninger <scott@barninger.com>
Sat, 16 Oct 2004 11:30:39 +0000 (11:30 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1652 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/cats/make_mysql_tables.in
bacula/src/cats/make_postgresql_tables.in
bacula/src/cats/make_sqlite_tables.in
bacula/src/cats/update_mysql_tables.in
bacula/src/cats/update_postgresql_tables.in
bacula/src/cats/update_sqlite_tables.in
bacula/src/cats/update_sqlite_tables.in.patch
bacula/updatedb/update_mysql_tables_7_to_8
bacula/updatedb/update_postgresql_tables_7_to_8
bacula/updatedb/update_sqlite_tables_7_to_8

index e5da834bbb6f233cd8948d904d0215dd4ae035e9..2834d345c396089e1d39b5fefa4efe449024fd71 100644 (file)
@@ -195,6 +195,12 @@ CREATE TABLE Counters (
    PRIMARY KEY (Counter(128))
    );
 
+CREATE TABLE CDImages (
+   MediaId INTEGER UNSIGNED NOT NULL,
+   LastBurn DATETIME NOT NULL,
+   PRIMARY KEY (MediaId)
+   );
+
 
 END-OF-DATA
 then
index ae642022e252f16d9a5a23b8ef98c08f1d2d929b..2f997484efa4e53f914cc1e70f1c3979049b2f19 100644 (file)
@@ -258,6 +258,13 @@ create table unsavedfiles
     primary key (UnsavedId)
 );
 
+create table CDImages 
+(
+   MediaId integer not null,
+   LastBurn timestamp without time zone not null,
+   primary key (MediaId)
+);
+
 -- Make sure we have appropriate permissions
 
 
index cc2acf219ccb8938945e7fe6fd479416c951aa7a..7102e196ae97cb42aab148d0b63b4931d464f2d5 100644 (file)
@@ -206,6 +206,13 @@ CREATE TABLE Counters (
    PRIMARY KEY (Counter)
    );
 
+CREATE TABLE CDImages (
+   MediaId INTEGER UNSIGNED NOT NULL,
+   LastBurn DATETIME NOT NULL,
+   PRIMARY KEY (MediaId)
+   );
+
+
 PRAGMA default_synchronous = OFF;
 PRAGMA default_cache_size = 10000;
 
index 5adc8f50fa8587c393c944c894324e3ca3632d68..64797d65f2a439ded9f740d95c50a0e02fce220e 100755 (executable)
@@ -19,6 +19,12 @@ ALTER TABLE File ADD INDEX (JobId, PathId, FilenameId);
 
 UPDATE Filename SET Name='' WHERE Name=' ';
 
+CREATE TABLE CDImages (
+   MediaId INTEGER UNSIGNED NOT NULL,
+   LastBurn DATETIME NOT NULL,
+   PRIMARY KEY (MediaId)
+   );
+
 DELETE FROM Version;
 INSERT INTO Version (VersionId) VALUES (8);
 
index c3fe199811a9ffce11db3eebe8ee2b38374b2933..873e063b3cf12e65f41e56c8a7ab0235ac05a81f 100755 (executable)
@@ -31,6 +31,13 @@ create index file_pathid_idx on file(pathid);
 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)
+);
+
 END-OF-DATA
 then
    echo "Update of Bacula PostgreSQL tables succeeded."
index 7d3610b0617bc53c24d57705a8a23902f9ed9b71..1a507be38a47b5b2478497384ece31f2f2cc9bf1 100755 (executable)
@@ -109,6 +109,12 @@ INSERT INTO Media (
 
 DROP TABLE Media_backup;
 
+CREATE TABLE CDImages (
+   MediaId INTEGER UNSIGNED NOT NULL,
+   LastBurn DATETIME NOT NULL,
+   PRIMARY KEY (MediaId)
+   );
+
 CREATE INDEX inx9 ON File (JobId, PathId, FileNameId);
 
 COMMIT;
index 614cf29f4187ba3b593828786b6605045194d6bc..7dba46c15ead2e5a03905e89c5e5c4c0da182d81 100644 (file)
@@ -1,4 +1,4 @@
-10c10
+11c11
 < bindir=@SQL_BINDIR@
 ---
 > bindir=/usr/lib/sqlite
index d1a346c38556cb8d936f4dee6e01baf5cf25c47d..58a50eff9f54a1d94237604b824059e8aeaef8cf 100755 (executable)
@@ -20,6 +20,12 @@ UPDATE Filename SET Name='' WHERE Name=' ';
 DELETE FROM Version;
 INSERT INTO Version (VersionId) VALUES (8);
 
+CREATE TABLE CDImages (
+   MediaId INTEGER UNSIGNED NOT NULL,
+   LastBurn DATETIME NOT NULL,
+   PRIMARY KEY (MediaId)
+   );
+
 END-OF-DATA
 then
    echo "Update of Bacula MySQL tables succeeded."
index d654f6014b341de5366a95678c63e4d6a62417c4..b2dd8e60a2fa1ae21656301ee99391f06af52048 100755 (executable)
@@ -20,6 +20,13 @@ UPDATE Filename SET Name='' WHERE Name=' ';
 DELETE FROM Version;
 INSERT INTO Version (VersionId) VALUES (8);
 
+create table CDImages 
+(
+   MediaId integer not null,
+   LastBurn timestamp without time zone not null,
+   primary key (MediaId)
+);
+
 END-OF-DATA
 then
    echo "Update of Bacula PostgreSQL tables succeeded."
index f0a33a1663d1e13f38db9c526f17dd7a7c4deb67..d7e1f83f9d5626a39fa26f629a8ff06e5737c03b 100755 (executable)
@@ -109,6 +109,12 @@ INSERT INTO Media (
 
 DROP TABLE Media_backup;
 
+CREATE TABLE CDImages (
+   MediaId INTEGER UNSIGNED NOT NULL,
+   LastBurn DATETIME NOT NULL,
+   PRIMARY KEY (MediaId)
+   );
+
 COMMIT;
 
 UPDATE Filename SET Name='' WHERE Name=' ';