db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
Dmsg1(050, "Delete MetaAttachment sql=%s\n", query.c_str());
- Mmsg(query, "DELETE FROM TagJob WHERE JobId IN (%s)", jobs);
- db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
- Dmsg1(050, "Delete TagJob sql=%s\n", query.c_str());
-
Mmsg(query, "DELETE FROM File WHERE JobId IN (%s)", jobs);
db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
Dmsg1(050, "Delete File sql=%s\n", query.c_str());
db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
Dmsg1(050, "Delete PathVisibility sql=%s\n", query.c_str());
+ Mmsg(query, "DELETE FROM Object WHERE JobId IN (%s)", jobs);
+ db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
+ Dmsg1(050, "Delete Object sql=%s\n", query.c_str());
+
+ Mmsg(query, "DELETE FROM FileMedia WHERE JobId IN (%s)", jobs);
+ db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
+ Dmsg1(050, "Delete JobMedia sql=%s\n", query.c_str());
+
/*
* Now mark Job as having files purged. This is necessary to
* avoid having too many Jobs to process in future prunings. If
db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
Dmsg1(050, "Delete JobMedia sql=%s\n", query.c_str());
- Mmsg(query, "DELETE FROM FileMedia WHERE JobId IN (%s)", jobs);
- db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
- Dmsg1(050, "Delete JobMedia sql=%s\n", query.c_str());
-
Mmsg(query, "DELETE FROM Log WHERE JobId IN (%s)", jobs);
db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
Dmsg1(050, "Delete Log sql=%s\n", query.c_str());
- Mmsg(query, "DELETE FROM Object WHERE JobId IN (%s)", jobs);
- db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
- Dmsg1(050, "Delete Object sql=%s\n", query.c_str());
-
Mmsg(query, "DELETE FROM RestoreObject WHERE JobId IN (%s)", jobs);
db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
Dmsg1(050, "Delete RestoreObject sql=%s\n", query.c_str());
+ Mmsg(query, "DELETE FROM TagJob WHERE JobId IN (%s)", jobs);
+ db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
+ Dmsg1(050, "Delete TagJob sql=%s\n", query.c_str());
+
/* The JobId of the Snapshot record is no longer usable
* TODO: Migth want to use a copy for the jobid?
*/