Showing posts with label Versioned DDL. Show all posts
Showing posts with label Versioned DDL. Show all posts

Versioning your Repository - Expert III

This part explains the versioning the DDL(SQL Scripts) used for creating the Tables.

Follow the following steps to change DDL(SQL Scripts).

Step 1: Remove the Foreign key references if any.

Step 2: Add following 7 columns to Primary table of RDF.

    asset_version         INTEGER NOT NULL,
    workspace_id         varchar2(40) NOT NULL,
    branch_id         varchar2(40) NOT NULL,
    is_head         number(1) NOT NULL,
    version_deleted     number(1) NOT NULL,
    version_editable     number(1) NOT NULL,
    pred_version         INTEGER NULL,
    checkin_date         TIMESTAMP NULL,
    CHECK (version_deleted IN (0, 1)),
    CHECK (version_editable IN (0, 1)),
    CHECK (is_head IN (0, 1))


Add  following single column to Auxiliary and Multi Table of RDF.

asset_version         INTEGER    NOT NULL

Step 3: Add asset_version to Primary, so you will have primary key as combination of existing primary key and asset_version.

Step 4: Remove the attribute "unique" from RDF. (ATG Suggests to do so. But I didn't find any harm in keeping the same).


Thus, you have versioned DDL for your RDF.