Sprint 18 Showcase

LT-1231 one-app, LT-547 db init script

LT-1231

Before

Simplification

After

Structure

la-parent

la-webparent

la-webcommonparent

la-parents

la-webcomon

user-mgr

curriculum-mgr

intervention-mgr

la-webcomon

LT-1231

Before

After

Project

LT-1231

Before

After

init project workflow

mkdir la && cd la
git clone la-parents
git clone la-common
git clone la-webcommon
git clone curriculum-mgr
git clone intervention-mgr
git clone user-mgr
cd la-parents/la-parent 
mvn clean install
cd ../la-webparent 
mvn clean install
cd ../la-webcommonparent 
mvn clean install
cd .. 
mvn clean install
git clone la-webcommon

cd la-webcommon

mvn clean install

LT-1231

Before

After

several modules changes workflow

LT-547

    create table cm_good_data_mufs (
        code varchar2(255 char) not null,
        mufs varchar2(255 char),
        primary key (code)
    );
    create table cm_good_data_profile (
        id number(19,0) not null,
        description varchar2(500 char),
        name varchar2(255 char),
        project_id varchar2(255 char),
        mufs varchar2(255 char),
        roles varchar2(255 char),
        primary key (id)
    );
    create table cm_good_data_roles (
        code varchar2(255 char) not null,
        role_names varchar2(255 char),
        primary key (code)
    );
    create table cm_permission (
        application_code varchar2(255 char) not null,
        code varchar2(255 char) not null,
        application_name varchar2(255 char),
        description varchar2(500 char),
        name varchar2(255 char),
        primary key (application_code, code)
    );
    create table cm_role (
        id number(19,0) not null,
        description varchar2(500 char),
        name varchar2(255 char) not null,
        primary key (id)
    );
    create table cm_role_permission (
        role_id number(19,0) not null,
        application_code varchar2(255 char) not null,
        permission_code varchar2(255 char) not null,
        primary key (role_id, application_code, permission_code)
    );
    create table cm_user (
        id number(10,0) not null,
        email varchar2(255 char) not null,
        enabled number(1,0),
        facilitator_key varchar2(255 char),
        first_name varchar2(255 char) not null,
        good_data_login varchar2(255 char),
        good_data_user_id varchar2(255 char),
        institution_code varchar2(255 char),
        last_name varchar2(255 char) not null,
        login varchar2(255 char) not null,
        password varchar2(255 char) not null,
        time_synced timestamp,
        user_institution_id varchar2(255 char),
        primary key (id)
    );
    create table cm_user_good_data_profile (
        user_id number(10,0) not null,
        profile_id number(19,0) not null,
        primary key (user_id, profile_id)
    );
    create table cm_user_role (
        user_id number(10,0) not null,
        role_id number(19,0) not null,
        primary key (user_id, role_id)
    );
    create table cmgr_curriculum (
        id number(10,0) not null,
        curriculum_institution_id varchar2(255 char),
        discarded number(1,0),
        institution_code varchar2(255 char),
        last_modified timestamp,
        outcome_mapping_state varchar2(255 char),
        term_institution_id varchar2(255 char),
        term_name varchar2(255 char),
        unit_code varchar2(255 char),
        unit_name varchar2(255 char),
        primary key (id)
    );
    create table cmgr_outcome (
        id number(10,0) not null,
        name varchar2(500 char),
        curriculum_id number(10,0) not null,
        primary key (id)
    );
    create table cmgr_outcome_mapping (
        id number(10,0) not null,
        activity_institution_id varchar2(255 char),
        activity_name varchar2(255 char),
        activity_sub_type varchar2(255 char),
        activity_type varchar2(255 char),
        institution_code varchar2(255 char),
        weight number(10,0) not null check (weight<=100 AND weight>=0),
        outcome_id number(10,0) not null,
        primary key (id)
    );
    create table imgr_data_source (
        id number(10,0) not null,
        batch_mode number(1,0),
        description varchar2(500 char),
        discarded number(1,0),
        institution_code varchar2(100 char),
        name varchar2(100 char) not null,
        primary key (id)
    );
    create table imgr_data_source_sql (
        id number(10,0) not null,
        code varchar2(50 char) not null,
        description varchar2(500 char),
        execution_order number(10,0),
        sql varchar2(3000 char),
        data_source_id number(10,0),
        primary key (id)
    );
    create table imgr_email_template (
        id number(10,0) not null,
        body clob not null,
        code varchar2(50 char) not null,
        institution_code varchar2(100 char),
        name varchar2(100 char) not null,
        subject varchar2(300 char) not null,
        primary key (id)
    );
    create table imgr_intervention (
        id number(10,0) not null,
        created timestamp,
        created_by varchar2(255 char),
        description varchar2(500 char),
        discarded number(1,0),
        enabled number(1,0),
        institution_code varchar2(100 char),
        last_modified timestamp,
        last_modified_by varchar2(255 char),
        name varchar2(200 char) not null,
        rules_id number(10,0) not null,
        primary key (id)
    );
    create table imgr_parameter_value (
        intervention_id number(10,0) not null,
        parameter_id number(10,0) not null,
        number_value raw(255),
        text_value varchar2(255 char),
        primary key (intervention_id, parameter_id)
    );
    create table imgr_rules (
        type varchar2(31 char) not null,
        id number(10,0) not null,
        description varchar2(500 char),
        discarded number(1,0),
        enabled number(1,0),
        institution_code varchar2(100 char),
        last_modified timestamp,
        name varchar2(500 char) not null,
        compilation_state varchar2(255 char),
        rules_content clob,
        when_condition clob,
        data_source_id number(10,0) not null,
        primary key (id)
    );
    create table imgr_rules_parameter (
        id number(10,0) not null,
        code varchar2(255 char),
        display_order number(10,0),
        label varchar2(255 char),
        type varchar2(255 char),
        rules_id number(10,0),
        primary key (id)
    );
    create table imgr_rules_run_history (
        id number(10,0) not null,
        finish_time timestamp,
        run_state varchar2(255 char),
        run_type varchar2(255 char),
        start_time timestamp not null,
        intervention_id number(10,0),
        rules_id number(10,0),
        primary key (id)
    );
    create table imgr_rules_run_log (
        id number(10,0) not null,
        message varchar2(3000 char),
        system_message number(1,0),
        time timestamp,
        run_history_id number(10,0),
        primary key (id)
    );
    create table imgr_rules_run_output (
        id number(10,0) not null,
        approval_state varchar2(255 char) not null,
        curriculum_code varchar2(255 char),
        curriculum_institution_id varchar2(255 char),
        curriculum_institution_type varchar2(255 char),
        curriculum_key number(19,0),
        curriculum_name varchar2(255 char),
        curriculum_type varchar2(255 char),
        enrolment_institution_id varchar2(255 char),
        enrolment_key number(19,0),
        facilitator_institution_id varchar2(255 char),
        facilitator_key number(19,0),
        institution_code varchar2(255 char),
        last_approval_state_change timestamp,
        offering_institution_id varchar2(255 char),
        offering_key number(19,0),
        other_details clob,
        product_institution_id varchar2(255 char),
        product_key number(19,0),
        student_institution_id varchar2(255 char),
        student_key number(19,0),
        term_code varchar2(255 char),
        term_institution_id varchar2(255 char),
        term_key number(19,0),
        term_name varchar2(255 char),
        run_history_id number(10,0),
        primary key (id)
    );
    create table imgr_rules_variable (
        id number(10,0) not null,
        code varchar2(255 char),
        display_order number(10,0),
        label varchar2(255 char),
        type varchar2(255 char),
        rules_id number(10,0),
        primary key (id)
    );
    create table test_table (
        id number(10,0) not null,
        full_name varchar2(300 char),
        name varchar2(255 char) not null,
        primary key (id)
    );
    create table umgr_dashboard_config (
        id number(10,0) not null,
        height varchar2(255 char) not null check (height<=9999 AND height>=200),
        name varchar2(255 char) not null,
        position number(19,0),
        sso_session_id varchar2(255 char),
        url varchar2(255 char) not null,
        width varchar2(255 char) not null check (width<=9999 AND width>=200),
        primary key (id)
    );
    create table umgr_student (
        id number(10,0) not null,
        api_id varchar2(255 char),
        created timestamp,
        institution_code varchar2(255 char),
        student_institution_id varchar2(255 char),
        time_synced timestamp,
        updated timestamp,
        primary key (id)
    );
    alter table cm_good_data_profile
        add constraint UK_t1yxmg7q94mqds0qquiepq5l  unique (name);
    alter table cm_permission
        add constraint UK_fqiv28eaub0rv46w9yb82oa70  unique (application_name, name);
    alter table cm_role
        add constraint UK_4iqc2wojoqyb2xpkx776fpafn  unique (name);
    alter table cm_user
        add constraint UK_236aff4grxii6gjn5lmukysaf  unique (login);
    create index UK_kw7g44lcur8vf7tpr7m30vbgx on cm_user (good_data_login);
    create index UK_2gdsqhq618ub46ey2gq4mqaji on cm_user (institution_code, user_institution_id);
    create index UK_1akxes1plffcitbbrk5rry38h on cm_user (time_synced);
    alter table cmgr_curriculum
        add constraint UK_qdsfdherkk6w3pgw3fxha9i9o  unique (curriculum_institution_id, institution_code, term_institution_id);
    create index UK_16glc4xc75gow2etfsqo4gjl on cmgr_outcome_mapping (institution_code, activity_institution_id);
    alter table imgr_data_source
        add constraint UK_ouw98k9y63takhp5a084sjv2t  unique (name, institution_code);
    alter table imgr_data_source_sql
        add constraint UK_5lk8ak0cp46345moy66gw9ru2  unique (code, data_source_id);
    alter table imgr_email_template
        add constraint UK_6cv54twci4n1womvl916r8nmo  unique (name, institution_code);
    alter table imgr_email_template
        add constraint UK_ie85pvpsb7m982p6bgry5kev0  unique (code, institution_code);
    alter table imgr_intervention
        add constraint UK_gtx5jngs4bkhquioiqpu6a9gc  unique (name, institution_code);
    alter table imgr_rules
        add constraint UK_tbk927bxbpvvbtsa6hmf2xbi2  unique (name, institution_code);
    alter table umgr_student
        add constraint UK_7i2f4vhpfhuhmwfkm8f1givxj  unique (institution_code, student_institution_id);
    alter table cm_good_data_profile
        add constraint FK_c1eoy3kegxpmqjw165leh09r2 
        foreign key (mufs) 
        references cm_good_data_mufs;
    alter table cm_good_data_profile
        add constraint FK_54im02eekr7lhpljemf4ourjn 
        foreign key (roles) 
        references cm_good_data_roles;
    alter table cm_role_permission
        add constraint FK_94f84a7byunaytpxekfj3n2y2 
        foreign key (application_code, permission_code) 
        references cm_permission;
    alter table cm_role_permission
        add constraint FK_jaec1bxrpd9it6rj6w4bitsxl 
        foreign key (role_id) 
        references cm_role;
    alter table cm_user_good_data_profile
        add constraint FK_44el033xrasi7vqkijl8la98u 
        foreign key (profile_id) 
        references cm_good_data_profile;
    alter table cm_user_good_data_profile
        add constraint FK_pkqag83f3h9jgmf57jhv8bc6h 
        foreign key (user_id) 
        references cm_user;
    alter table cm_user_role
        add constraint FK_at3upse1a7g77gs4uruu4p3j0 
        foreign key (role_id) 
        references cm_role;
    alter table cm_user_role
        add constraint FK_i12sbw2s871nbrhmw3ic60s1j 
        foreign key (user_id) 
        references cm_user;
    alter table cmgr_outcome
        add constraint FK_26krgqd1d5klayuas1x1ogvov 
        foreign key (curriculum_id) 
        references cmgr_curriculum;
    alter table cmgr_outcome_mapping
        add constraint FK_7rndhxs8p6q5xjasuyu67sdjm 
        foreign key (outcome_id) 
        references cmgr_outcome;
    alter table imgr_data_source_sql
        add constraint FK_j37himw5a2y64yswkuuetui2j 
        foreign key (data_source_id) 
        references imgr_data_source;
    alter table imgr_intervention
        add constraint FK_ewwk2gpjaj5u4vn51uf9fd2lc 
        foreign key (rules_id) 
        references imgr_rules;
    alter table imgr_parameter_value
        add constraint FK_e85cwi61tfw06yik78ux2ox31 
        foreign key (intervention_id) 
        references imgr_intervention;
    alter table imgr_parameter_value
        add constraint FK_o1a1t99phbbr13ph93bg4mtwu 
        foreign key (parameter_id) 
        references imgr_rules_parameter;
    alter table imgr_rules
        add constraint FK_hmcv6l8286kaxujidgmoi6icq 
        foreign key (data_source_id) 
        references imgr_data_source;
    alter table imgr_rules_parameter
        add constraint FK_sk72b954ae5j73ejccc20d5eu 
        foreign key (rules_id) 
        references imgr_rules;
    alter table imgr_rules_run_history
        add constraint FK_8xhr4ngmgxs8w0w5enk0jodpl 
        foreign key (intervention_id) 
        references imgr_intervention;
    alter table imgr_rules_run_history
        add constraint FK_k2k0nsjx9mfdw4sm3idslw9q7 
        foreign key (rules_id) 
        references imgr_rules;
    alter table imgr_rules_run_log
        add constraint FK_jmp3y3529vxomu1arytp15h32 
        foreign key (run_history_id) 
        references imgr_rules_run_history;
    alter table imgr_rules_run_output
        add constraint FK_glth57o0omuyyc6q9ui0jx2tk 
        foreign key (run_history_id) 
        references imgr_rules_run_history;
    alter table imgr_rules_variable
        add constraint FK_g90rw6s5me2hd08b0t786fdo 
        foreign key (rules_id) 
        references imgr_rules;
    create sequence CMGR_CURRICULUM_SEQ;
    create sequence CMGR_OUTCOME_MAPPING_SEQ;
    create sequence CMGR_OUTCOME_SEQ;
    create sequence CM_GOOD_DATA_PROFILE_SEQ;
    create sequence CM_ROLE_SEQ;
    create sequence CM_USER_SEQ;
    create sequence IMGR_DATA_SOURCE_SEQ;
    create sequence IMGR_DATA_SOURCE_SQL_SEQ;
    create sequence IMGR_EMAIL_TEMPLATE_SEQ;
    create sequence IMGR_INTERVENTION_SEQ;
    create sequence IMGR_RULES_PARAMETER_SEQ;
    create sequence IMGR_RULES_RUN_HISTORY_SEQ;
    create sequence IMGR_RULES_RUN_LOG_SEQ;
    create sequence IMGR_RULES_RUN_OUTPUT_SEQ;
    create sequence IMGR_RULES_SEQ;
    create sequence IMGR_RULES_VARIABLE_SEQ;
    create sequence UMGR_DASHBOARD_CONFIG_SEQ;
    create sequence UMGR_STUDENT_SEQ;

DB "golden image" script

Sprint 18

By aerondir

Sprint 18

  • 764