fs::delete_version (public)

 fs::delete_version -item_id item_id -version_id version_id

Defined in packages/file-storage/tcl/file-storage-procs.tcl

Deletes a revision. If it was the last revision, it deletes the file as well. Note that we do not perform filesystem operations here. A trigger on cr_revisions informs the content repository about the deletion and periodic cleanup of files to be deleted is performed in a scheduled procedure.

Switches:
-item_id (required)
-version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::delete_version fs::delete_version test_fs_add_delete_copy->fs::delete_version db_exec_plsql db_exec_plsql (public) fs::delete_version->db_exec_plsql fs::delete_file fs::delete_file (public) fs::delete_version->fs::delete_file packages/file-storage/www/version-delete.tcl packages/file-storage/ www/version-delete.tcl packages/file-storage/www/version-delete.tcl->fs::delete_version

Testcases:
fs_add_delete_copy
Source code:
    set parent_id [db_exec_plsql delete_version {}]

    if {$parent_id > 0} {
        delete_file -item_id $item_id -parent_id $parent_id
    }
    return $parent_id
Generic XQL file:
packages/file-storage/tcl/file-storage-procs.xql

PostgreSQL XQL file:
<fullquery name="fs::delete_version.delete_version">
    <querytext>

	select file_storage__delete_version(
			:item_id,
			:version_id
			);
      </querytext>
</fullquery>
packages/file-storage/tcl/file-storage-procs-postgresql.xql

Oracle XQL file:
packages/file-storage/tcl/file-storage-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: