diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-04-16 10:26:49 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-04-16 10:26:49 -0400 |
commit | 6ae87fe996678bd9a6f1c2fc46af63d0740bf5a7 (patch) | |
tree | 22e7383ecf12e1f2ef1444fbf846b3832d539b8e /lib/sisu/v2/db_remove.rb | |
parent | debian/changelog (2.0.5-1) (diff) | |
parent | update: changelog, version (2.1.0) (version bump for sql db structural changes) (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v2/db_remove.rb')
-rw-r--r-- | lib/sisu/v2/db_remove.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sisu/v2/db_remove.rb b/lib/sisu/v2/db_remove.rb index 99640cdf..0a51b892 100644 --- a/lib/sisu/v2/db_remove.rb +++ b/lib/sisu/v2/db_remove.rb @@ -68,19 +68,19 @@ module SiSU_DB_remove def remove driver_sqlite3=(@conn.inspect.match(/^(.{10})/)[1]==@db.sqlite.conn_sqlite3.inspect.match(/^(.{10})/)[1]) ? true : false del_id=if driver_sqlite3 - @conn.get_first_value(%{ SELECT tid FROM metadata WHERE filename LIKE '#{@opt.fns}'; }).to_i + @conn.get_first_value(%{ SELECT tid FROM metadata_and_text WHERE filename = '#{@opt.fns}'; }).to_i else - x=@conn.select_one(%{ SELECT tid FROM metadata WHERE filename LIKE '#{@opt.fns}'; }) - del=x ? (x.join.to_i) : nil + x=@conn.select_one(%{ SELECT metadata_and_text.tid FROM metadata_and_text WHERE metadata_and_text.filename = '#{@opt.fns}'; }) + x ? (x.join.to_i) : nil end if del_id sql_entry=[ "DELETE FROM endnotes WHERE metadata_tid = '#{del_id}';", "DELETE FROM endnotes_asterisk WHERE metadata_tid = '#{del_id}';", "DELETE FROM endnotes_plus WHERE metadata_tid = '#{del_id}';", - "DELETE FROM documents WHERE metadata_tid = '#{del_id}';", + "DELETE FROM doc_objects WHERE metadata_tid = '#{del_id}';", "DELETE FROM urls WHERE metadata_tid = '#{del_id}';", - "DELETE FROM metadata WHERE tid = '#{del_id}';", + "DELETE FROM metadata_and_text WHERE metadata_and_text.tid = '#{del_id}';", ] if driver_sqlite3 @conn.transaction |