This implementation uses a custom table, UC_PDF_CUSTOM_FILES
, to store the documents.
The first implementation does not have the version column. The second implementation uses a version.
When a custom table is used, the VERSION
column is optional, and PDF Region Pro increments the version column only when it's provided in the Version Column
attribute.
In SQL Workshop \ SQL Scripts \ Quick SQL
enter:
uc_pdf_custom_files
doc file
doc_owner
version_number
# settings = { PK: "TRIG", language: "EN", APEX: true }
Which generates:
-- create tables
create table uc_pdf_custom_files (
id number not null constraint uc_pdf_custom_files_id_pk primary key,
doc blob,
doc_filename varchar2(512),
doc_mimetype varchar2(512),
doc_charset varchar2(512),
doc_lastupd date,
doc_owner varchar2(4000),
version_number number
)
;
-- triggers
create or replace trigger uc_pdf_custom_files_biu
before insert or update
on uc_pdf_custom_files
for each row
begin
if :new.id is null then
:new.id := to_number(sys_guid(), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
end if;
end uc_pdf_custom_files_biu;
/