diff --git a/core/src/cats/dml/0018_uar_del_temp b/core/src/cats/dml/0018_uar_del_temp index bc38111a52c..7bdae6c5a49 100644 --- a/core/src/cats/dml/0018_uar_del_temp +++ b/core/src/cats/dml/0018_uar_del_temp @@ -1 +1 @@ -DROP TABLE temp +DROP TABLE IF EXISTS temp diff --git a/core/src/cats/dml/0019_uar_del_temp1 b/core/src/cats/dml/0019_uar_del_temp1 index 5da72f467ff..820de81c97d 100644 --- a/core/src/cats/dml/0019_uar_del_temp1 +++ b/core/src/cats/dml/0019_uar_del_temp1 @@ -1 +1 @@ -DROP TABLE temp1 +DROP TABLE IF EXISTS temp1 diff --git a/core/src/cats/mysql_queries.inc b/core/src/cats/mysql_queries.inc index e9773f1551b..8b555418388 100644 --- a/core/src/cats/mysql_queries.inc +++ b/core/src/cats/mysql_queries.inc @@ -214,11 +214,11 @@ const char *BareosDbMysql::query_definitions[] = { , /* 0018_uar_del_temp */ -"DROP TABLE temp " +"DROP TABLE IF EXISTS temp " , /* 0019_uar_del_temp1 */ -"DROP TABLE temp1 " +"DROP TABLE IF EXISTS temp1 " , /* 0020_uar_last_full */ diff --git a/core/src/cats/postgresql_queries.inc b/core/src/cats/postgresql_queries.inc index 718274a1c35..7c0ec929452 100644 --- a/core/src/cats/postgresql_queries.inc +++ b/core/src/cats/postgresql_queries.inc @@ -211,11 +211,11 @@ const char *BareosDbPostgresql::query_definitions[] = { , /* 0018_uar_del_temp */ -"DROP TABLE temp " +"DROP TABLE IF EXISTS temp " , /* 0019_uar_del_temp1 */ -"DROP TABLE temp1 " +"DROP TABLE IF EXISTS temp1 " , /* 0020_uar_last_full */ diff --git a/core/src/cats/sqlite_queries.inc b/core/src/cats/sqlite_queries.inc index d2bf6a637cc..94819f02f12 100644 --- a/core/src/cats/sqlite_queries.inc +++ b/core/src/cats/sqlite_queries.inc @@ -214,11 +214,11 @@ const char *BareosDbSqlite::query_definitions[] = { , /* 0018_uar_del_temp */ -"DROP TABLE temp " +"DROP TABLE IF EXISTS temp " , /* 0019_uar_del_temp1 */ -"DROP TABLE temp1 " +"DROP TABLE IF EXISTS temp1 " , /* 0020_uar_last_full */ diff --git a/core/src/dird/query.sql b/core/src/dird/query.sql index 37a9dc57d93..b932d02c07f 100644 --- a/core/src/dird/query.sql +++ b/core/src/dird/query.sql @@ -90,8 +90,8 @@ SELECT DISTINCT Job.JobId,VolumeName # 8 :List Volumes to Restore All Files *Enter Client Name: -!DROP TABLE temp; -!DROP TABLE temp2; +!DROP TABLE IF EXISTS temp; +!DROP TABLE IF EXISTS temp2; CREATE TABLE temp (JobId BIGINT NOT NULL, JobTDate BIGINT, ClientId BIGINT, @@ -135,8 +135,8 @@ INSERT INTO temp2 SELECT DISTINCT Job.JobId,Job.StartTime,Media.VolumeName, AND JobMedia.MediaId=Media.MediaId; # list results SELECT DISTINCT VolumeName from temp2; -!DROP TABLE temp; -!DROP TABLE temp2; +!DROP TABLE IF EXISTS temp; +!DROP TABLE IF EXISTS temp2; # 9 :List Pool Attributes for a selected Pool