Table of Contents
The GUS Schema may be extended by adding new columns to existing tables, or adding new tables and views. For the time being, adding new Schemata to GUS is not supported.
Extensions to the GUS may interfere with your ability to upgrade to future releases of GUS.
The first step to extending the Schema is to create the objects within the database.
When adding new columns to existing tables, it is important to
maintain the existing order of the columns, and only add new columns
between the existing columns and the housekeeping columns (eg before
the modification_date column). For
this reason, it will likely be necessary to rename the existing table;
create the modified table; and then migrate the date from the existing
table to the newly created table. As you perform this process, you
should ensure that all constraints (including both "incoming" and
"outgoing" foreign key constraints and primary key constraints) and
that indexes on the original table are created and applied on the
newly created table.
When creating new tables, it is important to include all
housekeeping columns at the "end" of the definition in the proper
order. All new tables should have a corresponding sequence created,
with the naming convention of:
. All new tables must have a single column primary key constraint
defined.TableSchemaName.TableName_SQ
Only views created as "subclass" views against an implementation table are supported. When creating new views, it is important to include all superclass columns in the view definition, including the housekeeping columns. Proper column ordering should be observed in the views.
If you've changed an existing GUS table, or wish to have GUS audit changes to your new tables and views, you must make the corresponding changes and/or additions to the version ("ver") tables and views.
GUS stores metadata for all tables and views in the
Core.TableInfo table. Whenever you
create a new table or view, you must add a corresponding row in this
table. The column descriptions are:
Table 2.1. Core.TableInfo
Description
| Column Name | Description |
|---|---|
table_id | The ID of this row, provided by the
com Core.TableInfo_SQ
sequence. |
name | The name of the table. The case used here will be used at object-generation time. |
table_type | Standard or
Version, depending on
whether this is a normal table or a version table |
primary_key_column | The name of the primary key column |
database_id | The id of the schema, found in
Core.DatabaseInfo |
is_versioned | 1 if the table has a corresponding version table. 0 otherwise. |
is_view | 1 if the "table" is a subclass view. 0 otherwise. |
view_on_table_id | If this "table" is a subclass view, the table id of the implementation table that this view is against. |
superclass_table_id | If this "table" is a subclass view, the table id of the superclass view. |
is_updatable | 1 if the table is read/write, 0 if it is read only. |