LIBREF, DSN, VAR_NM, VAR_TYPE, VAR_LEN, VAR_LOGIC and ACTIVE are NOT NULL in the table definition, so the requirement is stated once, in the model, instead of being repeated as NOTNULL rules in MPE_VALIDATIONS for each column. VAR_FMT stays nullable: it is optional on a derived variable, and its HARDREGEX already accepts an empty value. The seven NOTNULL rule inserts are removed from the 7.19 migration, and the comment on ACTIVE no longer describes a rule that is not there.
33 lines
984 B
SQL
33 lines
984 B
SQL
/**
|
|
@file mpe_derived.ddl
|
|
@brief ddl file
|
|
@details Defines the derived (computed) variable configuration table. This
|
|
drives MPE_DERIVED rows in MPE_TABLES, so that the table itself can be
|
|
maintained through the EDIT screen with the usual approve workflow.
|
|
|
|
Derived values are not persisted - the logic is applied at read time, before
|
|
the filter, so that the variables can be filtered on.
|
|
|
|
@version 9.2
|
|
@author 4GL Apps Ltd
|
|
@copyright 4GL Apps Ltd
|
|
**/
|
|
|
|
|
|
create table &curlib..MPE_DERIVED
|
|
(
|
|
TX_FROM num not null format=datetime19.3,
|
|
LIBREF varchar(8) not null,
|
|
DSN varchar(32) not null,
|
|
VAR_NM varchar(32) not null,
|
|
VAR_DEPS varchar(4000),
|
|
VAR_TYPE varchar(1) not null,
|
|
VAR_LEN int not null,
|
|
VAR_FMT varchar(32),
|
|
VAR_LABEL varchar(256),
|
|
VAR_LOGIC varchar(4000) not null,
|
|
ACTIVE int not null,
|
|
TX_TO num not null format=datetime19.3,
|
|
constraint pk_mpe_derived
|
|
primary key(tx_from, libref, dsn, var_nm));
|