Files
mip/Data/BulkLoad/EFT/Nominations/schema_build/scripts/audit_transactions.pdc

65 lines
1.5 KiB
Plaintext

-- Create table
create table AUDIT_TRANSACTIONS
(
AUTR_ID NUMBER not null,
AUSE_AUSE_ID NUMBER not null,
OPERATION_TYPE VARCHAR2(30) not null,
OPERATION_TARGET VARCHAR2(32),
OLD_VALUES NAME_VALUE_TAB,
NEW_VALUES NAME_VALUE_TAB,
CREATED_ON DATE not null,
CREATED_BY VARCHAR2(30) not null
)
nested table OLD_VALUES store as AUDIT_TRANSACTIONS_NT50
nested table NEW_VALUES store as AUDIT_TRANSACTIONS_NT60
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table AUDIT_TRANSACTIONS
add constraint AUTR_PK primary key (AUTR_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table AUDIT_TRANSACTIONS
add constraint AUTR_AUSE_FK foreign key (AUSE_AUSE_ID)
references AUDIT_SESSIONS (AUSE_ID);
-- Create/Recreate indexes
create unique index SYS_C00289310 on AUDIT_TRANSACTIONS (NEW_VALUES)
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
create unique index SYS_C00289311 on AUDIT_TRANSACTIONS (OLD_VALUES)
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);