From 9e5f1a99dfc8c786ca9f0e515a830ca64010020b Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 6 Aug 2009 16:21:29 +0200 Subject: [PATCH] Document FT_DELETED FileIndex=0 special value in database Schema --- bacula/src/cats/make_mysql_tables.in | 4 +++- bacula/src/cats/make_postgresql_tables.in | 3 +++ bacula/src/cats/make_sqlite3_tables.in | 4 +++- bacula/technotes | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index 56f49f8d16..3a6f460619 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -27,7 +27,9 @@ CREATE TABLE Path ( INDEX (Path(255)) ); - +-- In File table +-- FileIndex can be 0 for FT_DELETED files +-- FileNameId can link to Filename.Name='' for directories CREATE TABLE File ( FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, FileIndex INTEGER UNSIGNED DEFAULT 0, diff --git a/bacula/src/cats/make_postgresql_tables.in b/bacula/src/cats/make_postgresql_tables.in index bd136c6a0b..3a09576406 100644 --- a/bacula/src/cats/make_postgresql_tables.in +++ b/bacula/src/cats/make_postgresql_tables.in @@ -27,6 +27,9 @@ CREATE TABLE path ALTER TABLE path ALTER COLUMN path SET STATISTICS 1000; CREATE UNIQUE INDEX path_name_idx on path (path); +-- In File table +-- FileIndex can be 0 for FT_DELETED files +-- FileNameId can link to Filename.Name='' for directories CREATE TABLE file ( fileid bigserial not null, diff --git a/bacula/src/cats/make_sqlite3_tables.in b/bacula/src/cats/make_sqlite3_tables.in index 8f1ce00833..99b5dfd9e6 100644 --- a/bacula/src/cats/make_sqlite3_tables.in +++ b/bacula/src/cats/make_sqlite3_tables.in @@ -24,7 +24,9 @@ CREATE TABLE Path ( CREATE INDEX inx2 ON Path (Path); - +-- In File table +-- FileIndex can be 0 for FT_DELETED files +-- FileNameId can link to Filename.Name='' for directories CREATE TABLE File ( FileId INTEGER, FileIndex INTEGER UNSIGNED NOT NULL, diff --git a/bacula/technotes b/bacula/technotes index 916fd73d60..43e325668e 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -3,6 +3,7 @@ General: 06Aug09 +ebl Document FT_DELETED FileIndex=0 special value in database Schema ebl Add a new Bvfs class that implements brestore instant navigation cache inside Bacula. Works for Mysql, Postgresql and Sqlite3 kes bat: fix compiler warning for unreferenced argument -- 2.39.5