diff --git a/src/test/ddl-review/h2-create-all.sql b/src/test/ddl-review/h2-create-all.sql index af29ea19d..207d6b517 100644 --- a/src/test/ddl-review/h2-create-all.sql +++ b/src/test/ddl-review/h2-create-all.sql @@ -1,186 +1,242 @@ +-- Generated by ebean unknown at 2018-03-08T06:41:41.155Z create table asimple_bean ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_asimple_bean primary key (id) ); -create sequence asimple_bean_seq; create table bar ( bar_type varchar(31) not null, - bar_id integer not null, + bar_id integer auto_increment not null, foo_id integer not null, version integer not null, constraint pk_bar primary key (bar_id) ); -create sequence bar_seq; create table oto_account ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, constraint pk_oto_account primary key (id) ); -create sequence oto_account_seq; -create table o_address ( - id smallint not null, - line_1 varchar(100), - line_2 varchar(100), - city varchar(100), - cretime timestamp, - country_code varchar(2), - updtime timestamp not null, - constraint pk_o_address primary key (id) +create table addr ( + id bigint auto_increment not null, + employee_id bigint, + name varchar(255), + address_line1 varchar(255), + address_line2 varchar(255), + city varchar(255), + version bigint not null, + constraint pk_addr primary key (id) ); -create sequence o_address_seq; create table address ( - oid bigint not null, + oid bigint auto_increment not null, street varchar(255), version integer not null, constraint pk_address primary key (oid) ); -create sequence address_seq; -create table animals ( - species varchar(31) not null, - id bigint not null, +create table o_address ( + id smallint auto_increment not null, + line_1 varchar(100), + line_2 varchar(100), + city varchar(100), + cretime datetime(6), + country_code varchar(2), + updtime datetime(6) not null, + constraint pk_o_address primary key (id) +); + +create table album ( + id bigint auto_increment not null, + name varchar(255), + cover_id bigint, + deleted tinyint(1) default 0 not null, + created_at datetime(6) not null, + last_update datetime(6) not null, + constraint uq_album_cover_id unique (cover_id), + constraint pk_album primary key (id) +); + +create table animal ( + species varchar(255) not null, + id bigint auto_increment not null, shelter_id bigint, version bigint not null, name varchar(255), registration_number varchar(255), date_of_birth date, - constraint pk_animals primary key (id) + dog_size varchar(255), + constraint pk_animal primary key (id) ); -create sequence animals_seq; create table animal_shelter ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), version bigint not null, constraint pk_animal_shelter primary key (id) ); -create sequence animal_shelter_seq; create table article ( - id integer not null, + id integer auto_increment not null, name varchar(255), author varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_article primary key (id) ); -create sequence article_seq; create table attribute ( option_type integer(31) not null, - id integer not null, + id integer auto_increment not null, attribute_holder_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_attribute primary key (id) ); -create sequence attribute_seq; create table attribute_holder ( - id integer not null, - cretime timestamp not null, - updtime timestamp not null, + id integer auto_increment not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_attribute_holder primary key (id) ); -create sequence attribute_holder_seq; create table audit_log ( - id bigint not null, + id bigint auto_increment not null, description varchar(255), modified_description varchar(255), constraint pk_audit_log primary key (id) ); -create sequence audit_log_seq; create table bbookmark ( - id integer not null, + id integer auto_increment not null, bookmark_reference varchar(255), user_id integer, constraint pk_bbookmark primary key (id) ); -create sequence bbookmark_seq; create table bbookmark_user ( - id integer not null, + id integer auto_increment not null, name varchar(255), password varchar(255), email_address varchar(255), country varchar(255), constraint pk_bbookmark_user primary key (id) ); -create sequence bbookmark_user_seq; create table bsimple_with_gen ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_bsimple_with_gen primary key (id) ); -create sequence bsimple_with_gen_seq; + +create table bsite ( + id varchar(40) not null, + name varchar(255), + constraint pk_bsite primary key (id) +); + +create table bsite_user ( + site_id varchar(40) not null, + user_id varchar(40) not null, + access_level integer, + constraint ck_bsite_user_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user primary key (site_id,user_id) +); + +create table bsite_user_b ( + site varchar(40) not null, + usr varchar(40) not null, + access_level integer, + constraint ck_bsite_user_b_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_b primary key (site,usr) +); + +create table bsite_user_c ( + site_uid varchar(40) not null, + user_uid varchar(40) not null, + access_level integer, + constraint ck_bsite_user_c_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_c primary key (site_uid,user_uid) +); + +create table buser ( + id varchar(40) not null, + name varchar(255), + constraint pk_buser primary key (id) +); create table bwith_qident ( - id integer not null, - "Name" varchar(255), - last_updated timestamp not null, - constraint uq_bwith_qident_name unique ("Name"), + id integer auto_increment not null, + `Name` varchar(191), + last_updated datetime(6) not null, + constraint uq_bwith_qident_name unique (`Name`), constraint pk_bwith_qident primary key (id) ); -create sequence bwith_qident_seq; create table basic_joda_entity ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - created timestamp not null, - updated timestamp not null, - version timestamp not null, + period varchar(50), + created datetime(6) not null, + updated datetime(6) not null, + version datetime(6) not null, constraint pk_basic_joda_entity primary key (id) ); -create sequence basic_joda_entity_seq; create table bean_with_time_zone ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), timezone varchar(20), constraint pk_bean_with_time_zone primary key (id) ); -create sequence bean_with_time_zone_seq; create table drel_booking ( - id bigint not null, + id bigint auto_increment not null, + booking_uid bigint, agent_invoice bigint, client_invoice bigint, version integer not null, + constraint uq_drel_booking_booking_uid unique (booking_uid), constraint uq_drel_booking_agent_invoice unique (agent_invoice), constraint uq_drel_booking_client_invoice unique (client_invoice), constraint pk_drel_booking primary key (id) ); -create sequence drel_booking_seq; + +create table cinh_root ( + dtype varchar(3) not null, + id integer auto_increment not null, + license_number varchar(255), + cretime datetime(6) not null, + updtime datetime(6) not null, + version bigint not null, + driver varchar(255), + notes varchar(255), + action varchar(255), + constraint pk_cinh_root primary key (id) +); create table ckey_assoc ( - id integer not null, + id integer auto_increment not null, assoc_one varchar(255), constraint pk_ckey_assoc primary key (id) ); -create sequence ckey_assoc_seq; create table ckey_detail ( - id integer not null, + id integer auto_increment not null, something varchar(255), one_key integer, two_key varchar(127), constraint pk_ckey_detail primary key (id) ); -create sequence ckey_detail_seq; create table ckey_parent ( one_key integer not null, @@ -192,13 +248,12 @@ create table ckey_parent ( ); create table calculation_result ( - id integer not null, - charge double, + id integer auto_increment not null, + charge double not null, product_configuration_id integer, group_configuration_id integer, constraint pk_calculation_result primary key (id) ); -create sequence calculation_result_seq; create table cao_bean ( x_cust_id integer not null, @@ -209,18 +264,16 @@ create table cao_bean ( ); create table sa_car ( - id bigint not null, + id bigint auto_increment not null, version integer not null, constraint pk_sa_car primary key (id) ); -create sequence sa_car_seq; create table sp_car_car ( - id bigint not null, + id bigint auto_increment not null, version integer not null, constraint pk_sp_car_car primary key (id) ); -create sequence sp_car_car_seq; create table sp_car_car_wheels ( car bigint not null, @@ -229,82 +282,101 @@ create table sp_car_car_wheels ( ); create table car_accessory ( - id integer not null, + id integer auto_increment not null, name varchar(255), + fuse_id bigint not null, car_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_car_accessory primary key (id) ); -create sequence car_accessory_seq; + +create table car_fuse ( + id bigint auto_increment not null, + location_code varchar(255), + constraint pk_car_fuse primary key (id) +); + +create table category ( + id bigint auto_increment not null, + name varchar(255), + surveyobjectid bigint, + sequence_number integer not null, + constraint pk_category primary key (id) +); + +create table child_person ( + identifier integer auto_increment not null, + name varchar(255), + age integer, + some_bean_id integer, + parent_identifier integer, + family_name varchar(255), + address varchar(255), + constraint pk_child_person primary key (identifier) +); create table configuration ( - type varchar(31) not null, - id integer not null, + type varchar(21) not null, + id integer auto_increment not null, name varchar(255), configurations_id integer, group_name varchar(255), product_name varchar(255), constraint pk_configuration primary key (id) ); -create sequence configuration_seq; create table configurations ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_configurations primary key (id) ); -create sequence configurations_seq; create table contact ( - id integer not null, - first_name varchar(255), - last_name varchar(255), + id integer auto_increment not null, + first_name varchar(127), + last_name varchar(127), phone varchar(255), mobile varchar(255), email varchar(255), customer_id integer not null, group_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, constraint pk_contact primary key (id) ); -create sequence contact_seq; create table contact_group ( - id integer not null, + id integer auto_increment not null, name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_contact_group primary key (id) ); -create sequence contact_group_seq; create table contact_note ( - id integer not null, + id integer auto_increment not null, contact_id integer, title varchar(255), - note clob, - cretime timestamp not null, - updtime timestamp not null, + note longtext, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_contact_note primary key (id) ); -create sequence contact_note_seq; create table c_conversation ( - id bigint not null, + id bigint auto_increment not null, title varchar(255), - isopen boolean, + isopen tinyint(1) default 0 not null, group_id bigint, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, constraint pk_c_conversation primary key (id) ); -create sequence c_conversation_seq; create table o_country ( code varchar(2) not null, @@ -312,361 +384,621 @@ create table o_country ( constraint pk_o_country primary key (code) ); +create table cover ( + id bigint auto_increment not null, + s3url varchar(255), + deleted tinyint(1) default 0 not null, + constraint pk_cover primary key (id) +); + create table o_customer ( - id integer not null, - status varchar(1), + id integer auto_increment not null, + status varchar(1) comment 'status of the customer', name varchar(40) not null, - smallnote varchar(100), - anniversary date, + smallnote varchar(100) comment 'Short notes regarding the customer', + anniversary date comment 'Join date of the customer', billing_address_id smallint, shipping_address_id smallint, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, - constraint ck_o_customer_status check (status in ('N','A','I')), + constraint ck_o_customer_status check ( status in ('N','A','I')), constraint pk_o_customer primary key (id) +) comment='Holds external customers'; + +create table dcredit ( + id bigint auto_increment not null, + credit varchar(255), + constraint pk_dcredit primary key (id) +); + +create table dcredit_drol ( + dcredit_id bigint not null, + drol_id bigint not null, + constraint pk_dcredit_drol primary key (dcredit_id,drol_id) ); -create sequence o_customer_seq; create table dexh_entity ( - oid bigint not null, - exhange_rate decimal(38), - exhange_cmoney_amount decimal(38), - exhange_cmoney_currency varchar(3), - last_updated timestamp not null, + oid bigint auto_increment not null, + exhange varchar(255), + an_enum_type varchar(255), + last_updated datetime(6) not null, constraint pk_dexh_entity primary key (oid) ); -create sequence dexh_entity_seq; create table dperson ( - id bigint not null, + id bigint auto_increment not null, first_name varchar(255), last_name varchar(255), salary decimal(38), - a_amt decimal(38), - a_curr varchar(3), - i_start timestamp, - i_end timestamp, constraint pk_dperson primary key (id) ); -create sequence dperson_seq; + +create table drol ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_drol primary key (id) +); + +create table drot ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_drot primary key (id) +); + +create table drot_drol ( + drot_id bigint not null, + drol_id bigint not null, + constraint pk_drot_drol primary key (drot_id,drol_id) +); create table rawinherit_data ( - id bigint not null, + id bigint auto_increment not null, val integer, constraint pk_rawinherit_data primary key (id) ); -create sequence rawinherit_data_seq; -create table e_basic ( - id integer not null, - status varchar(1), +create table dfk_cascade ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_cascade primary key (id) +); + +create table dfk_cascade_one ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_dfk_cascade_one primary key (id) +); + +create table dfk_none ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_none primary key (id) +); + +create table dfk_none_via_join ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_none_via_join primary key (id) +); + +create table dfk_one ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_dfk_one primary key (id) +); + +create table dfk_set_null ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_set_null primary key (id) +); + +create table doc ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_doc primary key (id) +); + +create table doc_link ( + doc_id bigint not null, + link_id bigint not null, + constraint pk_doc_link primary key (doc_id,link_id) +); + +create table doc_link_draft ( + doc_id bigint not null, + link_id bigint not null, + constraint pk_doc_link_draft primary key (doc_id,link_id) +); + +create table doc_draft ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_doc_draft primary key (id) +); + +create table document ( + id bigint auto_increment not null, + title varchar(127), + body varchar(255), + organisation_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint uq_document_title unique (title), + constraint pk_document primary key (id) +); + +create table document_draft ( + id bigint auto_increment not null, + title varchar(127), + body varchar(255), + when_publish datetime(6), + organisation_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint uq_document_draft_title unique (title), + constraint pk_document_draft primary key (id) +); + +create table document_media ( + id bigint auto_increment not null, + document_id bigint, name varchar(255), description varchar(255), - some_date timestamp, - constraint ck_e_basic_status check (status in ('N','A','I')), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_document_media primary key (id) +); + +create table document_media_draft ( + id bigint auto_increment not null, + document_id bigint, + name varchar(255), + description varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_document_media_draft primary key (id) +); + +create table earray_bean ( + id bigint auto_increment not null, + name varchar(255), + phone_numbers varchar(300), + uids varchar(1000), + other_ids varchar(1000), + doubs varchar(1000), + statuses varchar(1000), + status2 varchar(1000), + version bigint not null, + constraint pk_earray_bean primary key (id) +); + +create table earray_set_bean ( + id bigint auto_increment not null, + name varchar(255), + phone_numbers varchar(300), + uids varchar(1000), + other_ids varchar(1000), + doubs varchar(1000), + version bigint not null, + constraint pk_earray_set_bean primary key (id) +); + +create table e_basic ( + id integer auto_increment not null, + status varchar(1), + name varchar(127), + description varchar(255), + some_date datetime(6), + constraint ck_e_basic_status check ( status in ('N','A','I')), constraint pk_e_basic primary key (id) ); -create sequence e_basic_seq; + +create table ebasic_change_log ( + id bigint auto_increment not null, + name varchar(20), + short_description varchar(50), + long_description varchar(100), + who_created varchar(255) not null, + who_modified varchar(255) not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + version bigint not null, + constraint pk_ebasic_change_log primary key (id) +); create table ebasic_clob ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), title varchar(255), - description clob, - last_update timestamp not null, + description longtext, + last_update datetime(6) not null, constraint pk_ebasic_clob primary key (id) ); -create sequence ebasic_clob_seq; create table ebasic_clob_fetch_eager ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), title varchar(255), - description clob, - last_update timestamp not null, + description longtext, + last_update datetime(6) not null, constraint pk_ebasic_clob_fetch_eager primary key (id) ); -create sequence ebasic_clob_fetch_eager_seq; create table ebasic_clob_no_ver ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - description clob, + description longtext, constraint pk_ebasic_clob_no_ver primary key (id) ); -create sequence ebasic_clob_no_ver_seq; create table e_basicenc ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varbinary(80), dob varbinary(20), - last_update timestamp, + status varbinary(20), + last_update datetime(6), constraint pk_e_basicenc primary key (id) ); -create sequence e_basicenc_seq; create table e_basicenc_bin ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), - data blob, + data longblob, some_time varbinary(255), - last_update timestamp not null, + last_update datetime(6) not null, constraint pk_e_basicenc_bin primary key (id) ); -create sequence e_basicenc_bin_seq; create table e_basic_enum_id ( status varchar(1) not null, name varchar(255), description varchar(255), - constraint ck_e_basic_enum_id_status check (status in ('N','A','I')), + constraint ck_e_basic_enum_id_status check ( status in ('N','A','I')), constraint pk_e_basic_enum_id primary key (status) ); -create table ebasic_json_map ( - id bigint not null, +create table e_basic_eni ( + id integer auto_increment not null, + status integer, name varchar(255), - content clob, + description varchar(255), + some_date datetime(6), + constraint ck_e_basic_eni_status check ( status in (1,2,3)), + constraint pk_e_basic_eni primary key (id) +); + +create table ebasic_hstore ( + id bigint auto_increment not null, + name varchar(255), + map varchar(800), + version bigint not null, + constraint pk_ebasic_hstore primary key (id) +); + +create table ebasic_json_list ( + id bigint auto_increment not null, + name varchar(255), + bean_set varchar(700), + bean_list longtext, + bean_map varchar(700), + plain_bean varchar(500), + flags varchar(50), + tags varchar(100), + version bigint not null, + constraint pk_ebasic_json_list primary key (id) +); + +create table ebasic_json_map ( + id bigint auto_increment not null, + name varchar(255), + content longtext, version bigint not null, constraint pk_ebasic_json_map primary key (id) ); -create sequence ebasic_json_map_seq; create table ebasic_json_map_blob ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content blob, + content longblob, version bigint not null, constraint pk_ebasic_json_map_blob primary key (id) ); -create sequence ebasic_json_map_blob_seq; create table ebasic_json_map_clob ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content clob, + content longtext, version bigint not null, constraint pk_ebasic_json_map_clob primary key (id) ); -create sequence ebasic_json_map_clob_seq; + +create table ebasic_json_map_detail ( + id bigint auto_increment not null, + owner_id bigint, + name varchar(255), + content longtext, + version bigint not null, + constraint pk_ebasic_json_map_detail primary key (id) +); create table ebasic_json_map_json_b ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content clob, + content longtext, version bigint not null, constraint pk_ebasic_json_map_json_b primary key (id) ); -create sequence ebasic_json_map_json_b_seq; create table ebasic_json_map_varchar ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), content varchar(3000), version bigint not null, constraint pk_ebasic_json_map_varchar primary key (id) ); -create sequence ebasic_json_map_varchar_seq; create table ebasic_json_node ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content clob, + content longtext, version bigint not null, constraint pk_ebasic_json_node primary key (id) ); -create sequence ebasic_json_node_seq; create table ebasic_json_node_blob ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content blob, + content longblob, version bigint not null, constraint pk_ebasic_json_node_blob primary key (id) ); -create sequence ebasic_json_node_blob_seq; create table ebasic_json_node_json_b ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content clob, + content longtext, version bigint not null, constraint pk_ebasic_json_node_json_b primary key (id) ); -create sequence ebasic_json_node_json_b_seq; create table ebasic_json_node_varchar ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), content varchar(1000), version bigint not null, constraint pk_ebasic_json_node_varchar primary key (id) ); -create sequence ebasic_json_node_varchar_seq; + +create table ebasic_json_unmapped ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_ebasic_json_unmapped primary key (id) +); create table e_basic_ndc ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_e_basic_ndc primary key (id) ); -create sequence e_basic_ndc_seq; + +create table ebasic_no_sdchild ( + id bigint auto_increment not null, + owner_id bigint not null, + child_name varchar(255), + amount bigint not null, + version bigint not null, + constraint pk_ebasic_no_sdchild primary key (id) +); + +create table ebasic_sdchild ( + id bigint auto_increment not null, + owner_id bigint not null, + child_name varchar(255), + amount bigint not null, + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_ebasic_sdchild primary key (id) +); + +create table ebasic_soft_delete ( + id bigint auto_increment not null, + name varchar(255), + description varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_ebasic_soft_delete primary key (id) +); create table e_basicver ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), other varchar(255), - last_update timestamp not null, + last_update datetime(6) not null, constraint pk_e_basicver primary key (id) ); -create sequence e_basicver_seq; create table e_basic_withlife ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), + deleted tinyint(1) default 0 not null, version bigint not null, constraint pk_e_basic_withlife primary key (id) ); -create sequence e_basic_withlife_seq; create table e_basicverucon ( - id integer not null, - name varchar(255), - other varchar(255), - other_one varchar(255), + id integer auto_increment not null, + name varchar(127), + other varchar(127), + other_one varchar(127), description varchar(255), - last_update timestamp not null, + last_update datetime(6) not null, constraint uq_e_basicverucon_name unique (name), + constraint uq_e_basicverucon_other_other_one unique (other,other_one), constraint pk_e_basicverucon primary key (id) ); -create sequence e_basicverucon_seq; + +create table e_col_ab ( + id bigint auto_increment not null, + column_a varchar(255), + column_b varchar(255), + constraint pk_e_col_ab primary key (id) +); + +create table ecustom_id ( + id varchar(127) not null, + name varchar(255), + constraint pk_ecustom_id primary key (id) +); create table eemb_inner ( - id integer not null, + id integer auto_increment not null, nome_inner varchar(255), outer_id integer, update_count integer not null, constraint pk_eemb_inner primary key (id) ); -create sequence eemb_inner_seq; create table eemb_outer ( - id integer not null, + id integer auto_increment not null, nome_outer varchar(255), - date1 timestamp, - date2 timestamp, + date1 datetime(6), + date2 datetime(6), update_count integer not null, constraint pk_eemb_outer primary key (id) ); -create sequence eemb_outer_seq; create table egen_props ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, - ts_created timestamp not null, - ts_updated timestamp not null, - ldt_created timestamp not null, - ldt_updated timestamp not null, - odt_created timestamp not null, - odt_updated timestamp not null, - zdt_created timestamp not null, - zdt_updated timestamp not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + ts_created datetime(6) not null, + ts_updated datetime(6) not null, + ldt_created datetime(6) not null, + ldt_updated datetime(6) not null, + odt_created datetime(6) not null, + odt_updated datetime(6) not null, + zdt_created datetime(6) not null, + zdt_updated datetime(6) not null, + instant_created datetime(6) not null, + instant_updated datetime(6) not null, long_created bigint not null, long_updated bigint not null, constraint pk_egen_props primary key (id) ); -create sequence egen_props_seq; create table einvoice ( - id bigint not null, - invoice_date timestamp, + id bigint auto_increment not null, + invoice_date datetime(6), state integer, person_id bigint, ship_street varchar(255), ship_suburb varchar(255), ship_city varchar(255), - street varchar(255), - suburb varchar(255), - city varchar(255), + ship_status varchar(3), + bill_street varchar(255), + bill_suburb varchar(255), + bill_city varchar(255), + bill_status varchar(3), version bigint not null, - constraint ck_einvoice_state check (state in (0,1,2)), + constraint ck_einvoice_state check ( state in (0,1,2)), + constraint ck_einvoice_ship_status check ( ship_status in ('ONE','TWO')), + constraint ck_einvoice_bill_status check ( bill_status in ('ONE','TWO')), constraint pk_einvoice primary key (id) ); -create sequence einvoice_seq; create table e_main ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), version bigint not null, constraint pk_e_main primary key (id) ); -create sequence e_main_seq; create table enull_collection ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_enull_collection primary key (id) ); -create sequence enull_collection_seq; create table enull_collection_detail ( - id integer not null, + id integer auto_increment not null, enull_collection_id integer not null, something varchar(255), constraint pk_enull_collection_detail primary key (id) ); -create sequence enull_collection_detail_seq; create table eopt_one_a ( - id integer not null, + id integer auto_increment not null, name_for_a varchar(255), b_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_eopt_one_a primary key (id) ); -create sequence eopt_one_a_seq; create table eopt_one_b ( - id integer not null, + id integer auto_increment not null, name_for_b varchar(255), c_id integer not null, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_eopt_one_b primary key (id) ); -create sequence eopt_one_b_seq; create table eopt_one_c ( - id integer not null, + id integer auto_increment not null, name_for_c varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_eopt_one_c primary key (id) ); -create sequence eopt_one_c_seq; create table eperson ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), notes varchar(255), street varchar(255), suburb varchar(255), - city varchar(255), + addr_city varchar(255), + addr_status varchar(3), version bigint not null, + constraint ck_eperson_addr_status check ( addr_status in ('ONE','TWO')), constraint pk_eperson primary key (id) ); -create sequence eperson_seq; + +create table e_person_online ( + id bigint auto_increment not null, + email varchar(127), + online_status tinyint(1) default 0 not null, + when_updated datetime(6) not null, + constraint uq_e_person_online_email unique (email), + constraint pk_e_person_online primary key (id) +); create table esimple ( usertypeid integer auto_increment not null, @@ -674,97 +1006,204 @@ create table esimple ( constraint pk_esimple primary key (usertypeid) ); +create table esoft_del_book ( + id bigint auto_increment not null, + book_title varchar(255), + lend_by_id bigint, + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_book primary key (id) +); + +create table esoft_del_book_esoft_del_user ( + esoft_del_book_id bigint not null, + esoft_del_user_id bigint not null, + constraint pk_esoft_del_book_esoft_del_user primary key (esoft_del_book_id,esoft_del_user_id) +); + +create table esoft_del_down ( + id bigint auto_increment not null, + esoft_del_mid_id bigint not null, + down varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_down primary key (id) +); + +create table esoft_del_mid ( + id bigint auto_increment not null, + top_id bigint, + mid varchar(255), + up_id bigint, + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_mid primary key (id) +); + +create table esoft_del_one_a ( + id bigint auto_increment not null, + name varchar(255), + oneb_id bigint, + deleted tinyint(1) default 0 not null, + version bigint not null, + constraint uq_esoft_del_one_a_oneb_id unique (oneb_id), + constraint pk_esoft_del_one_a primary key (id) +); + +create table esoft_del_one_b ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_esoft_del_one_b primary key (id) +); + +create table esoft_del_role ( + id bigint auto_increment not null, + role_name varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_role primary key (id) +); + +create table esoft_del_role_esoft_del_user ( + esoft_del_role_id bigint not null, + esoft_del_user_id bigint not null, + constraint pk_esoft_del_role_esoft_del_user primary key (esoft_del_role_id,esoft_del_user_id) +); + +create table esoft_del_top ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_top primary key (id) +); + +create table esoft_del_up ( + id bigint auto_increment not null, + up varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_up primary key (id) +); + +create table esoft_del_user ( + id bigint auto_increment not null, + user_name varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_user primary key (id) +); + +create table esoft_del_user_esoft_del_role ( + esoft_del_user_id bigint not null, + esoft_del_role_id bigint not null, + constraint pk_esoft_del_user_esoft_del_role primary key (esoft_del_user_id,esoft_del_role_id) +); + +create table esome_convert_type ( + id bigint auto_increment not null, + name varchar(255), + money decimal(38), + constraint pk_esome_convert_type primary key (id) +); + create table esome_type ( - id integer not null, + id integer auto_increment not null, currency varchar(3), locale varchar(20), time_zone varchar(20), constraint pk_esome_type primary key (id) ); -create sequence esome_type_seq; create table etrans_many ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_etrans_many primary key (id) ); -create sequence etrans_many_seq; + +create table rawinherit_uncle ( + id integer auto_increment not null, + name varchar(255), + parent_id bigint not null, + version bigint not null, + constraint pk_rawinherit_uncle primary key (id) +); create table evanilla_collection ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_evanilla_collection primary key (id) ); -create sequence evanilla_collection_seq; create table evanilla_collection_detail ( - id integer not null, + id integer auto_increment not null, evanilla_collection_id integer not null, something varchar(255), constraint pk_evanilla_collection_detail primary key (id) ); -create sequence evanilla_collection_detail_seq; create table ewho_props ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, who_created varchar(255) not null, who_modified varchar(255) not null, - version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, constraint pk_ewho_props primary key (id) ); -create sequence ewho_props_seq; create table e_withinet ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), inet_address varchar(50), version bigint not null, constraint pk_e_withinet primary key (id) ); -create sequence e_withinet_seq; create table td_child ( - child_id integer not null, + child_id integer auto_increment not null, child_name varchar(255), parent_id integer not null, constraint pk_td_child primary key (child_id) ); -create sequence td_child_seq; create table td_parent ( parent_type varchar(31) not null, - parent_id integer not null, + parent_id integer auto_increment not null, parent_name varchar(255), extended_name varchar(255), constraint pk_td_parent primary key (parent_id) ); -create sequence td_parent_seq; + +create table empl ( + id bigint auto_increment not null, + name varchar(255), + age integer, + default_address_id bigint, + constraint pk_empl primary key (id) +); create table feature_desc ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), constraint pk_feature_desc primary key (id) ); -create sequence feature_desc_seq; create table f_first ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_f_first primary key (id) ); -create sequence f_first_seq; create table foo ( - foo_id integer not null, + foo_id integer auto_increment not null, important_text varchar(255), version integer not null, constraint pk_foo primary key (foo_id) ); -create sequence foo_seq; create table gen_key_identity ( id bigint auto_increment not null, @@ -773,120 +1212,227 @@ create table gen_key_identity ( ); create table gen_key_sequence ( - id bigint not null, + id bigint auto_increment not null, description varchar(255), constraint pk_gen_key_sequence primary key (id) ); -create sequence seq; create table gen_key_table ( - id bigint not null, + id bigint auto_increment not null, description varchar(255), constraint pk_gen_key_table primary key (id) ); -create sequence gen_key_table_seq; + +create table grand_parent_person ( + identifier integer auto_increment not null, + name varchar(255), + age integer, + some_bean_id integer, + family_name varchar(255), + address varchar(255), + constraint pk_grand_parent_person primary key (identifier) +); + +create table survey_group ( + id bigint auto_increment not null, + name varchar(255), + categoryobjectid bigint, + sequence_number integer not null, + constraint pk_survey_group primary key (id) +); create table c_group ( - id bigint not null, - inactive boolean, + id bigint auto_increment not null, + inactive tinyint(1) default 0 not null, name varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, constraint pk_c_group primary key (id) ); -create sequence c_group_seq; + +create table he_doc ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_he_doc primary key (id) +); + +create table hx_link ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_hx_link primary key (id) +); + +create table hx_link_doc ( + hx_link_id bigint not null, + he_doc_id bigint not null, + constraint pk_hx_link_doc primary key (hx_link_id,he_doc_id) +); + +create table hi_doc ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_hi_doc primary key (id) +); + +create table hi_link ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_hi_link primary key (id) +); + +create table hi_link_doc ( + hi_link_id bigint not null, + hi_doc_id bigint not null, + constraint pk_hi_link_doc primary key (hi_link_id,hi_doc_id) +); create table imrelated ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), owner_id bigint not null, constraint pk_imrelated primary key (id) ); -create sequence imrelated_seq; create table imroot ( - dtype varchar(10) not null, - id bigint not null, - title varchar(255), - when_title timestamp, + dtype varchar(31) not null, + id bigint auto_increment not null, name varchar(255), + title varchar(255), + when_title datetime(6), constraint pk_imroot primary key (id) ); -create sequence imroot_seq; create table ixresource ( dtype varchar(255), - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_ixresource primary key (id) ); create table info_company ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), version bigint not null, constraint pk_info_company primary key (id) ); -create sequence info_company_seq; create table info_contact ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), company_id bigint not null, version bigint not null, constraint pk_info_contact primary key (id) ); -create sequence info_contact_seq; create table info_customer ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), company_id bigint, version bigint not null, constraint uq_info_customer_company_id unique (company_id), constraint pk_info_customer primary key (id) ); -create sequence info_customer_seq; create table inner_report ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), forecast_id bigint, constraint uq_inner_report_forecast_id unique (forecast_id), constraint pk_inner_report primary key (id) ); -create sequence inner_report_seq; create table drel_invoice ( - id bigint not null, + id bigint auto_increment not null, booking bigint, version integer not null, constraint pk_drel_invoice primary key (id) ); -create sequence drel_invoice_seq; create table item ( customer integer not null, - itemnumber varchar(255) not null, + itemnumber varchar(127) not null, description varchar(255), units varchar(255), - type integer, - region integer, - date_modified timestamp, - date_created timestamp, + type integer not null, + region integer not null, + date_modified datetime(6), + date_created datetime(6), modified_by varchar(255), created_by varchar(255), version bigint not null, constraint pk_item primary key (customer,itemnumber) ); +create table monkey ( + mid bigint auto_increment not null, + name varchar(255), + food_preference varchar(255), + version bigint not null, + constraint pk_monkey primary key (mid) +); + +create table trainer ( + tid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_trainer primary key (tid) +); + +create table trainer_monkey ( + trainer_tid bigint not null, + monkey_mid bigint not null, + constraint uq_trainer_monkey_mid unique (monkey_mid), + constraint pk_trainer_monkey primary key (trainer_tid,monkey_mid) +); + +create table troop ( + pid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_troop primary key (pid) +); + +create table troop_monkey ( + troop_pid bigint not null, + monkey_mid bigint not null, + constraint uq_troop_monkey_mid unique (monkey_mid), + constraint pk_troop_monkey primary key (troop_pid,monkey_mid) +); + +create table l2_cldf_reset_bean ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_l2_cldf_reset_bean primary key (id) +); + +create table l2_cldf_reset_bean_child ( + id bigint auto_increment not null, + parent_id bigint, + constraint pk_l2_cldf_reset_bean_child primary key (id) +); + create table level1 ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_level1 primary key (id) ); -create sequence level1_seq; create table level1_level4 ( level1_id bigint not null, @@ -901,11 +1447,10 @@ create table level1_level2 ( ); create table level2 ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_level2 primary key (id) ); -create sequence level2_seq; create table level2_level3 ( level2_id bigint not null, @@ -914,28 +1459,52 @@ create table level2_level3 ( ); create table level3 ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_level3 primary key (id) ); -create sequence level3_seq; create table level4 ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_level4 primary key (id) ); -create sequence level4_seq; + +create table link ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + when_publish datetime(6), + link_comment varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + deleted tinyint(1) default 0 not null, + constraint pk_link primary key (id) +); + +create table link_draft ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + when_publish datetime(6), + link_comment varchar(255), + dirty tinyint(1) default 0 not null, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + deleted tinyint(1) default 0 not null, + constraint pk_link_draft primary key (id) +); create table la_attr_value ( - id integer not null, + id integer auto_increment not null, name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_la_attr_value primary key (id) ); -create sequence la_attr_value_seq; create table la_attr_value_attribute ( la_attr_value_id integer not null, @@ -945,25 +1514,23 @@ create table la_attr_value_attribute ( create table mmedia ( type varchar(31) not null, - id bigint not null, + id bigint auto_increment not null, url varchar(255), note varchar(255), constraint pk_mmedia primary key (id) ); -create sequence mmedia_seq; create table non_updateprop ( - id integer not null, + id integer auto_increment not null, non_enum varchar(5), name varchar(255), note varchar(255), - constraint ck_non_updateprop_non_enum check (non_enum in ('BEGIN','END')), + constraint ck_non_updateprop_non_enum check ( non_enum in ('BEGIN','END')), constraint pk_non_updateprop primary key (id) ); -create sequence non_updateprop_seq; create table mprinter ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), flags bigint not null, current_state_id bigint, @@ -973,43 +1540,38 @@ create table mprinter ( last_swap_black_id bigint, version bigint not null, constraint uq_mprinter_last_swap_cyan_id unique (last_swap_cyan_id), - constraint uq_mprinter_last_swap_magenta_2 unique (last_swap_magenta_id), + constraint uq_mprinter_last_swap_magenta_id unique (last_swap_magenta_id), constraint uq_mprinter_last_swap_yellow_id unique (last_swap_yellow_id), constraint uq_mprinter_last_swap_black_id unique (last_swap_black_id), constraint pk_mprinter primary key (id) ); -create sequence mprinter_seq; create table mprinter_state ( - id bigint not null, - flags bigint, + id bigint auto_increment not null, + flags bigint not null, printer_id bigint, version bigint not null, constraint pk_mprinter_state primary key (id) ); -create sequence mprinter_state_seq; create table mprofile ( - id bigint not null, + id bigint auto_increment not null, picture_id bigint, name varchar(255), constraint pk_mprofile primary key (id) ); -create sequence mprofile_seq; create table mprotected_construct_bean ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_mprotected_construct_bean primary key (id) ); -create sequence mprotected_construct_bean_seq; create table mrole ( - roleid integer not null, + roleid integer auto_increment not null, role_name varchar(255), constraint pk_mrole primary key (roleid) ); -create sequence mrole_seq; create table mrole_muser ( mrole_roleid integer not null, @@ -1018,64 +1580,83 @@ create table mrole_muser ( ); create table msome_other ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_msome_other primary key (id) ); -create sequence msome_other_seq; create table muser ( - userid integer not null, + userid integer auto_increment not null, user_name varchar(255), user_type_id integer, constraint pk_muser primary key (userid) ); -create sequence muser_seq; create table muser_type ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_muser_type primary key (id) ); -create sequence muser_type_seq; + +create table mail_box ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_mail_box primary key (id) +); + +create table mail_user ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_mail_user primary key (id) +); + +create table mail_user_inbox ( + mail_user_id bigint not null, + mail_box_id bigint not null, + constraint pk_mail_user_inbox primary key (mail_user_id,mail_box_id) +); + +create table mail_user_outbox ( + mail_user_id bigint not null, + mail_box_id bigint not null, + constraint pk_mail_user_outbox primary key (mail_user_id,mail_box_id) +); create table map_super_actual ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - when_created timestamp not null, - when_updated timestamp not null, + when_created datetime(6) not null, + when_updated datetime(6) not null, constraint pk_map_super_actual primary key (id) ); -create sequence map_super_actual_seq; create table c_message ( - id bigint not null, + id bigint auto_increment not null, title varchar(255), body varchar(255), conversation_id bigint, user_id bigint, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, constraint pk_c_message primary key (id) ); -create sequence c_message_seq; create table mnoc_role ( - role_id integer not null, + role_id integer auto_increment not null, role_name varchar(255), version integer not null, constraint pk_mnoc_role primary key (role_id) ); -create sequence mnoc_role_seq; create table mnoc_user ( - user_id integer not null, + user_id integer auto_increment not null, user_name varchar(255), version integer not null, constraint pk_mnoc_user primary key (user_id) ); -create sequence mnoc_user_seq; create table mnoc_user_mnoc_role ( mnoc_user_user_id integer not null, @@ -1083,52 +1664,122 @@ create table mnoc_user_mnoc_role ( constraint pk_mnoc_user_mnoc_role primary key (mnoc_user_user_id,mnoc_role_role_id) ); +create table mny_a ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_mny_a primary key (id) +); + +create table mny_b ( + id bigint auto_increment not null, + name varchar(255), + a_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_mny_b primary key (id) +); + +create table mny_b_mny_c ( + mny_b_id bigint not null, + mny_c_id bigint not null, + constraint pk_mny_b_mny_c primary key (mny_b_id,mny_c_id) +); + +create table mny_c ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_mny_c primary key (id) +); + +create table mny_topic ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_mny_topic primary key (id) +); + +create table subtopics ( + topic bigint not null, + subtopic bigint not null, + constraint pk_subtopics primary key (topic,subtopic) +); + create table mp_role ( - id bigint not null, + id bigint auto_increment not null, mp_user_id bigint not null, code varchar(255), organization_id bigint, constraint pk_mp_role primary key (id) ); -create sequence mp_role_seq; create table mp_user ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_mp_user primary key (id) ); -create sequence mp_user_seq; + +create table ms_many_a ( + aid bigint auto_increment not null, + name varchar(255), + ms_many_a_many_b tinyint(1) default 0 not null, + ms_many_b tinyint(1) default 0 not null, + deleted tinyint(1) default 0 not null, + constraint pk_ms_many_a primary key (aid) +); + +create table ms_many_a_many_b ( + ms_many_a_aid bigint not null, + ms_many_b_bid bigint not null, + constraint pk_ms_many_a_many_b primary key (ms_many_a_aid,ms_many_b_bid) +); + +create table ms_many_b ( + bid bigint auto_increment not null, + name varchar(255), + deleted tinyint(1) default 0 not null, + constraint pk_ms_many_b primary key (bid) +); + +create table ms_many_b_many_a ( + ms_many_b_bid bigint not null, + ms_many_a_aid bigint not null, + constraint pk_ms_many_b_many_a primary key (ms_many_b_bid,ms_many_a_aid) +); create table my_lob_size ( - id integer not null, + id integer auto_increment not null, name varchar(255), - my_count integer, - my_lob clob, + my_count integer not null, + my_lob longtext, constraint pk_my_lob_size primary key (id) ); -create sequence my_lob_size_seq; create table my_lob_size_join_many ( - id integer not null, + id integer auto_increment not null, something varchar(255), other varchar(255), parent_id integer, constraint pk_my_lob_size_join_many primary key (id) ); -create sequence my_lob_size_join_many_seq; create table noidbean ( name varchar(255), subject varchar(255), - when_created timestamp not null + when_created datetime(6) not null ); create table o_cached_bean ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_o_cached_bean primary key (id) ); -create sequence o_cached_bean_seq; create table o_cached_bean_country ( o_cached_bean_id bigint not null, @@ -1137,25 +1788,50 @@ create table o_cached_bean_country ( ); create table o_cached_bean_child ( - id bigint not null, + id bigint auto_increment not null, cached_bean_id bigint, constraint pk_o_cached_bean_child primary key (id) ); -create sequence o_cached_bean_child_seq; + +create table o_cached_natkey ( + id bigint auto_increment not null, + store varchar(255), + sku varchar(255), + description varchar(255), + constraint pk_o_cached_natkey primary key (id) +); + +create table o_cached_natkey3 ( + id bigint auto_increment not null, + store varchar(255), + code integer not null, + sku varchar(255), + description varchar(255), + constraint pk_o_cached_natkey3 primary key (id) +); create table ocar ( - id integer not null, + id integer auto_increment not null, vin varchar(255), name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_ocar primary key (id) ); -create sequence ocar_seq; + +create table ocompany ( + id integer auto_increment not null, + corp_id varchar(50), + cretime datetime(6) not null, + updtime datetime(6) not null, + version bigint not null, + constraint uq_ocompany_corp_id unique (corp_id), + constraint pk_ocompany primary key (id) +); create table oengine ( - engine_id binary(16) not null, + engine_id varchar(40) not null, short_desc varchar(255), car_id integer, version integer not null, @@ -1164,7 +1840,7 @@ create table oengine ( ); create table ogear_box ( - id binary(16) not null, + id varchar(40) not null, box_desc varchar(255), box_size integer, car_id integer, @@ -1173,243 +1849,390 @@ create table ogear_box ( constraint pk_ogear_box primary key (id) ); +create table oroad_show_msg ( + id integer auto_increment not null, + company_id integer not null, + cretime datetime(6) not null, + updtime datetime(6) not null, + version bigint not null, + constraint uq_oroad_show_msg_company_id unique (company_id), + constraint pk_oroad_show_msg primary key (id) +); + +create table om_ordered_detail ( + id bigint auto_increment not null, + name varchar(255), + master_id bigint, + version bigint not null, + sort_order integer, + constraint pk_om_ordered_detail primary key (id) +); + +create table om_ordered_master ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_om_ordered_master primary key (id) +); + create table o_order ( - id integer not null, + id integer auto_increment not null, status integer, order_date date, ship_date date, kcustomer_id integer not null, - cretime timestamp not null, - updtime timestamp not null, - constraint ck_o_order_status check (status in (0,1,2,3)), + cretime datetime(6) not null, + updtime datetime(6) not null, + constraint ck_o_order_status check ( status in (0,1,2,3)), constraint pk_o_order primary key (id) ); -create sequence o_order_seq; create table o_order_detail ( - id integer not null, - order_id integer, + id integer auto_increment not null, + order_id integer not null, order_qty integer, ship_qty integer, unit_price double, product_id integer, - cretime timestamp, - updtime timestamp not null, + cretime datetime(6), + updtime datetime(6) not null, constraint pk_o_order_detail primary key (id) ); -create sequence o_order_detail_seq; create table s_orders ( - uuid varchar(255) not null, + uuid varchar(40) not null, constraint pk_s_orders primary key (uuid) ); create table s_order_items ( - uuid varchar(255) not null, + uuid varchar(40) not null, product_variant_uuid varchar(255), - order_uuid varchar(255), - quantity integer, + order_uuid varchar(40), + quantity integer not null, amount decimal(38), constraint pk_s_order_items primary key (uuid) ); create table or_order_ship ( - id integer not null, + id integer auto_increment not null, order_id integer, - ship_time timestamp, - cretime timestamp not null, - updtime timestamp not null, + ship_time datetime(6), + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_or_order_ship primary key (id) ); -create sequence or_order_ship_seq; + +create table organisation ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_organisation primary key (id) +); + +create table oto_bchild ( + master_id bigint auto_increment not null, + child varchar(255), + constraint pk_oto_bchild primary key (master_id) +); + +create table oto_bmaster ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_oto_bmaster primary key (id) +); create table oto_child ( - id integer not null, + id integer auto_increment not null, name varchar(255), master_id bigint, constraint uq_oto_child_master_id unique (master_id), constraint pk_oto_child primary key (id) ); -create sequence oto_child_seq; + +create table oto_cust ( + cid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_oto_cust primary key (cid) +); + +create table oto_cust_address ( + aid bigint auto_increment not null, + line1 varchar(255), + line2 varchar(255), + line3 varchar(255), + customer_cid bigint, + version bigint not null, + constraint uq_oto_cust_address_customer_cid unique (customer_cid), + constraint pk_oto_cust_address primary key (aid) +); create table oto_master ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_oto_master primary key (id) ); -create sequence oto_master_seq; + +create table oto_prime ( + pid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_oto_prime primary key (pid) +); + +create table oto_prime_extra ( + eid bigint not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_prime_extra primary key (eid) +); + +create table oto_th_many ( + id bigint auto_increment not null, + oto_th_top_id bigint not null, + many varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_oto_th_many primary key (id) +); + +create table oto_th_one ( + id bigint auto_increment not null, + one tinyint(1) default 0 not null, + many_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint uq_oto_th_one_many_id unique (many_id), + constraint pk_oto_th_one primary key (id) +); + +create table oto_th_top ( + id bigint auto_increment not null, + topp varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_oto_th_top primary key (id) +); + +create table oto_ubprime ( + pid varchar(40) not null, + name varchar(255), + version bigint not null, + constraint pk_oto_ubprime primary key (pid) +); + +create table oto_ubprime_extra ( + eid varchar(40) not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_ubprime_extra primary key (eid) +); + +create table oto_uprime ( + pid varchar(40) not null, + name varchar(255), + version bigint not null, + constraint pk_oto_uprime primary key (pid) +); + +create table oto_uprime_extra ( + eid varchar(40) not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_uprime_extra primary key (eid) +); create table pfile ( - id integer not null, + id integer auto_increment not null, name varchar(255), file_content_id integer, file_content2_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint uq_pfile_file_content_id unique (file_content_id), constraint uq_pfile_file_content2_id unique (file_content2_id), constraint pk_pfile primary key (id) ); -create sequence pfile_seq; create table pfile_content ( - id integer not null, - content blob, - cretime timestamp not null, - updtime timestamp not null, + id integer auto_increment not null, + content longblob, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_pfile_content primary key (id) ); -create sequence pfile_content_seq; create table paggview ( - pview_id binary(16), + pview_id varchar(40), amount integer not null, constraint uq_paggview_pview_id unique (pview_id) ); create table pallet_location ( type varchar(31) not null, - id integer not null, + id integer auto_increment not null, zone_sid integer not null, attribute varchar(255), constraint pk_pallet_location primary key (id) ); -create sequence pallet_location_seq; create table parcel ( - parcelid bigint not null, + parcelid bigint auto_increment not null, description varchar(255), constraint pk_parcel primary key (parcelid) ); -create sequence parcel_seq; create table parcel_location ( - parcellocid bigint not null, + parcellocid bigint auto_increment not null, location varchar(255), parcelid bigint, constraint uq_parcel_location_parcelid unique (parcelid), constraint pk_parcel_location primary key (parcellocid) ); -create sequence parcel_location_seq; create table rawinherit_parent ( type varchar(31) not null, - id bigint not null, + id bigint auto_increment not null, val integer, + more varchar(255), constraint pk_rawinherit_parent primary key (id) ); -create sequence rawinherit_parent_seq; -create table rawinherit_parent_rawinherit_dat ( +create table rawinherit_parent_rawinherit_data ( rawinherit_parent_id bigint not null, rawinherit_data_id bigint not null, - constraint pk_rawinherit_parent_rawinher_0 primary key (rawinherit_parent_id,rawinherit_data_id) + constraint pk_rawinherit_parent_rawinherit_data primary key (rawinherit_parent_id,rawinherit_data_id) +); + +create table parent_person ( + identifier integer auto_increment not null, + name varchar(255), + age integer, + some_bean_id integer, + parent_identifier integer, + family_name varchar(255), + address varchar(255), + constraint pk_parent_person primary key (identifier) ); create table c_participation ( - id bigint not null, + id bigint auto_increment not null, rating integer, type integer, conversation_id bigint not null, user_id bigint not null, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, - constraint ck_c_participation_type check (type in (0,1)), + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint ck_c_participation_type check ( type in (0,1)), constraint pk_c_participation primary key (id) ); -create sequence c_participation_seq; create table mt_permission ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_mt_permission primary key (id) ); create table persistent_file ( - id integer not null, + id integer auto_increment not null, name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_persistent_file primary key (id) ); -create sequence persistent_file_seq; create table persistent_file_content ( - id integer not null, + id integer auto_increment not null, persistent_file_id integer, - content blob, - cretime timestamp not null, - updtime timestamp not null, + content longblob, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, - constraint uq_persistent_file_content_pe_1 unique (persistent_file_id), + constraint uq_persistent_file_content_persistent_file_id unique (persistent_file_id), constraint pk_persistent_file_content primary key (id) ); -create sequence persistent_file_content_seq; create table persons ( - id bigint not null, + id bigint auto_increment not null, surname varchar(64) not null, name varchar(64) not null, constraint pk_persons primary key (id) ); -create sequence persons_seq start with 1000 increment by 40; create table person ( - oid bigint not null, + oid bigint auto_increment not null, default_address_oid bigint, version integer not null, constraint pk_person primary key (oid) ); -create sequence person_seq; create table phones ( - id bigint not null, + id bigint auto_increment not null, phone_number varchar(7) not null, person_id bigint not null, constraint uq_phones_phone_number unique (phone_number), constraint pk_phones primary key (id) ); -create sequence phones_seq; + +create table primary_revision ( + id bigint not null, + revision integer not null, + name varchar(255), + version bigint not null, + constraint pk_primary_revision primary key (id,revision) +); create table o_product ( - id integer not null, + id integer auto_increment not null, sku varchar(20), name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, constraint pk_o_product primary key (id) ); -create sequence o_product_seq; create table pp ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), value varchar(100) not null, constraint pk_pp primary key (id) ); create table pp_to_ww ( - pp_id binary(16) not null, - ww_id binary(16) not null, + pp_id varchar(40) not null, + ww_id varchar(40) not null, constraint pk_pp_to_ww primary key (pp_id,ww_id) ); +create table question ( + id bigint auto_increment not null, + name varchar(255), + groupobjectid bigint, + sequence_number integer not null, + constraint pk_question primary key (id) +); + create table rcustomer ( - company varchar(255) not null, - name varchar(255) not null, + company varchar(127) not null, + name varchar(127) not null, description varchar(255), constraint pk_rcustomer primary key (company,name) ); create table r_orders ( - company varchar(255) not null, + company varchar(127) not null, order_number integer not null, - customername varchar(255), + customername varchar(127), item varchar(255), constraint pk_r_orders primary key (company,order_number) ); @@ -1429,299 +2252,317 @@ create table resourcefile ( constraint pk_resourcefile primary key (id) ); +create table em_role ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_em_role primary key (id) +); + create table mt_role ( - id binary(16) not null, + id varchar(40) not null, name varchar(50), - tenant_id binary(16), + tenant_id varchar(40), version bigint not null, constraint pk_mt_role primary key (id) ); create table mt_role_permission ( - mt_role_id binary(16) not null, - mt_permission_id binary(16) not null, + mt_role_id varchar(40) not null, + mt_permission_id varchar(40) not null, constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) ); -create table em_role ( - id bigint not null, - name varchar(255), - constraint pk_em_role primary key (id) -); -create sequence em_role_seq; - create table f_second ( - id bigint not null, + id bigint auto_increment not null, + mod_name varchar(255), first bigint, title varchar(255), constraint uq_f_second_first unique (first), constraint pk_f_second primary key (id) ); -create sequence f_second_seq; create table section ( - id integer not null, + id integer auto_increment not null, article_id integer, type integer, - content clob, - cretime timestamp not null, - updtime timestamp not null, + content longtext, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, - constraint ck_section_type check (type in (0,1)), + constraint ck_section_type check ( type in (0,1)), constraint pk_section primary key (id) ); -create sequence section_seq; create table self_parent ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), parent_id bigint, version bigint not null, constraint pk_self_parent primary key (id) ); -create sequence self_parent_seq; create table self_ref_customer ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), referred_by_id bigint, constraint pk_self_ref_customer primary key (id) ); -create sequence self_ref_customer_seq; create table self_ref_example ( - id bigint not null, + id bigint auto_increment not null, name varchar(255) not null, parent_id bigint, constraint pk_self_ref_example primary key (id) ); -create sequence self_ref_example_seq; create table some_enum_bean ( - id bigint not null, + id bigint auto_increment not null, some_enum integer, name varchar(255), - constraint ck_some_enum_bean_some_enum check (some_enum in (0,1)), + constraint ck_some_enum_bean_some_enum check ( some_enum in (0,1)), constraint pk_some_enum_bean primary key (id) ); -create sequence some_enum_bean_seq; create table some_file_bean ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), - content blob, + content longblob, version bigint not null, constraint pk_some_file_bean primary key (id) ); -create sequence some_file_bean_seq; create table some_new_types_bean ( - id bigint not null, + id bigint auto_increment not null, dow integer(1), mth integer(1), yr integer, yr_mth date, local_date date, - local_date_time timestamp, - offset_date_time timestamp, - zoned_date_time timestamp, - instant timestamp, + local_date_time datetime(6), + offset_date_time datetime(6), + zoned_date_time datetime(6), + instant datetime(6), zone_id varchar(60), zone_offset varchar(60), + path varchar(255), + period varchar(20), version bigint not null, - constraint ck_some_new_types_bean_dow check (dow in ('1','2','3','4','5','6','7')), - constraint ck_some_new_types_bean_mth check (mth in ('1','2','3','4','5','6','7','8','9','10','11','12')), + constraint ck_some_new_types_bean_dow check ( dow in (1,2,3,4,5,6,7)), + constraint ck_some_new_types_bean_mth check ( mth in (1,2,3,4,5,6,7,8,9,10,11,12)), constraint pk_some_new_types_bean primary key (id) ); -create sequence some_new_types_bean_seq; create table some_period_bean ( - id bigint not null, - period_years integer, - period_months integer, - period_days integer, + id bigint auto_increment not null, anniversary date, version bigint not null, constraint pk_some_period_bean primary key (id) ); -create sequence some_period_bean_seq; create table stockforecast ( type varchar(31) not null, - id bigint not null, + id bigint auto_increment not null, inner_report_id bigint, constraint pk_stockforecast primary key (id) ); -create sequence stockforecast_seq; create table sub_section ( - id integer not null, + id integer auto_increment not null, section_id integer, title varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_sub_section primary key (id) ); -create sequence sub_section_seq; create table sub_type ( - sub_type_id integer not null, + sub_type_id integer auto_increment not null, description varchar(255), version bigint not null, constraint pk_sub_type primary key (sub_type_id) ); -create sequence sub_type_seq; + +create table survey ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_survey primary key (id) +); create table tbytes_only ( - id integer not null, - content blob, + id integer auto_increment not null, + content longblob, constraint pk_tbytes_only primary key (id) ); -create sequence tbytes_only_seq; create table tcar ( type varchar(31) not null, - plate_no varchar(255) not null, + plate_no varchar(32) not null, truckload bigint, constraint pk_tcar primary key (plate_no) ); +create table tevent ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_tevent primary key (id) +); + +create table tevent_many ( + id bigint auto_increment not null, + description varchar(255), + event_id bigint, + units integer not null, + amount double not null, + version bigint not null, + constraint pk_tevent_many primary key (id) +); + +create table tevent_one ( + id bigint auto_increment not null, + name varchar(255), + status integer, + event_id bigint, + version bigint not null, + constraint ck_tevent_one_status check ( status in (0,1)), + constraint uq_tevent_one_event_id unique (event_id), + constraint pk_tevent_one primary key (id) +); + create table tint_root ( my_type integer(3) not null, - id integer not null, + id integer auto_increment not null, name varchar(255), child_property varchar(255), constraint pk_tint_root primary key (id) ); -create sequence tint_root_seq; create table tjoda_entity ( - id integer not null, + id integer auto_increment not null, local_time time, constraint pk_tjoda_entity primary key (id) ); -create sequence tjoda_entity_seq; create table t_mapsuper1 ( - id integer not null, + id integer auto_increment not null, something varchar(255), name varchar(255), version integer not null, constraint pk_t_mapsuper1 primary key (id) ); -create sequence t_mapsuper1_seq; create table t_oneb ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), - active boolean, + active tinyint(1) default 0 not null, constraint pk_t_oneb primary key (id) ); -create sequence t_oneb_seq; create table t_detail_with_other_namexxxyy ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), - active boolean, + some_unique_value varchar(127), + active tinyint(1) default 0 not null, master_id integer, - constraint pk_t_detail_with_other_namexx_0 primary key (id) + constraint uq_t_detail_with_other_namexxxyy_some_unique_value unique (some_unique_value), + constraint pk_t_detail_with_other_namexxxyy primary key (id) ); -create sequence t_atable_detail_seq; create table ts_detail_two ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), - active boolean, + active tinyint(1) default 0 not null, master_id integer, constraint pk_ts_detail_two primary key (id) ); -create sequence ts_detail_two_seq; create table t_atable_thatisrelatively ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), - active boolean, + active tinyint(1) default 0 not null, constraint pk_t_atable_thatisrelatively primary key (id) ); -create sequence t_atable_master_seq; create table ts_master_two ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), - active boolean, + active tinyint(1) default 0 not null, constraint pk_ts_master_two primary key (id) ); -create sequence ts_master_two_seq; create table tuuid_entity ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_tuuid_entity primary key (id) ); create table twheel ( - id bigint not null, - owner_plate_no varchar(255) not null, + id bigint auto_increment not null, + owner_plate_no varchar(32) not null, constraint pk_twheel primary key (id) ); -create sequence twheel_seq; create table twith_pre_insert ( - id integer not null, + id integer auto_increment not null, name varchar(255) not null, title varchar(255), constraint pk_twith_pre_insert primary key (id) ); -create sequence twith_pre_insert_seq; create table mt_tenant ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), version bigint not null, constraint pk_mt_tenant primary key (id) ); -create table sa_tire ( - id bigint not null, - version integer not null, - constraint pk_sa_tire primary key (id) +create table test_annotation_base_entity ( + direct varchar(255), + meta varchar(255), + mixed varchar(255), + constraint_annotation varchar(40), + null1 varchar(255) not null, + null2 varchar(255), + null3 varchar(255) ); -create sequence sa_tire_seq; create table tire ( - id bigint not null, + id bigint auto_increment not null, wheel bigint, version integer not null, constraint uq_tire_wheel unique (wheel), constraint pk_tire primary key (id) ); -create sequence tire_seq; + +create table sa_tire ( + id bigint auto_increment not null, + version integer not null, + constraint pk_sa_tire primary key (id) +); create table trip ( - id integer not null, + id integer auto_increment not null, vehicle_driver_id integer, destination varchar(255), address_id smallint, - star_date timestamp, - cretime timestamp not null, - updtime timestamp not null, + star_date datetime(6), + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_trip primary key (id) ); -create sequence trip_seq; create table truck_ref ( - id integer not null, + id integer auto_increment not null, something varchar(255), constraint pk_truck_ref primary key (id) ); -create sequence truck_ref_seq; create table type ( customer integer not null, @@ -1732,8 +2573,16 @@ create table type ( constraint pk_type primary key (customer,type) ); +create table tz_bean ( + id bigint auto_increment not null, + moda varchar(255), + ts datetime(6), + tstz datetime(6), + constraint pk_tz_bean primary key (id) +); + create table ut_detail ( - id integer not null, + id integer auto_increment not null, utmaster_id integer not null, name varchar(255), qty integer, @@ -1741,68 +2590,70 @@ create table ut_detail ( version integer not null, constraint pk_ut_detail primary key (id) ); -create sequence ut_detail_seq; create table ut_master ( - id integer not null, + id integer auto_increment not null, name varchar(255), description varchar(255), version integer not null, constraint pk_ut_master primary key (id) ); -create sequence ut_master_seq; create table uuone ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_uuone primary key (id) ); create table uutwo ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), - master_id binary(16), + master_id varchar(40), constraint pk_uutwo primary key (id) ); -create table em_user ( - id bigint not null, +create table c_user ( + id bigint auto_increment not null, + inactive tinyint(1) default 0 not null, name varchar(255), - constraint pk_em_user primary key (id) + email varchar(255), + password_hash varchar(255), + group_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_c_user primary key (id) ); -create sequence em_user_seq; create table tx_user ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), constraint pk_tx_user primary key (id) ); -create sequence tx_user_seq; -create table c_user ( - id bigint not null, - inactive boolean, - name varchar(255), - email varchar(255), - group_id bigint, +create table g_user ( + id bigint auto_increment not null, + username varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, - constraint pk_c_user primary key (id) + constraint pk_g_user primary key (id) +); + +create table em_user ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_em_user primary key (id) ); -create sequence c_user_seq; create table oto_user ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), account_id bigint not null, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, constraint uq_oto_user_account_id unique (account_id), constraint pk_oto_user primary key (id) ); -create sequence oto_user_seq; create table em_user_role ( user_id bigint not null, @@ -1812,39 +2663,39 @@ create table em_user_role ( create table vehicle ( dtype varchar(3) not null, - id integer not null, + id integer auto_increment not null, license_number varchar(255), - registration_date timestamp, - cretime timestamp not null, - updtime timestamp not null, + registration_date datetime(6), + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, - truck_ref_id integer, - capacity double, + siz varchar(1), driver varchar(255), car_ref_id integer, + notes varchar(255), + truck_ref_id integer, + capacity double, + constraint ck_vehicle_siz check ( siz in ('S','M','L','H')), constraint pk_vehicle primary key (id) ); -create sequence vehicle_seq; create table vehicle_driver ( - id integer not null, + id integer auto_increment not null, name varchar(255), vehicle_id integer, address_id smallint, - license_issued_on timestamp, - cretime timestamp not null, - updtime timestamp not null, + license_issued_on datetime(6), + cretime datetime(6) not null, + updtime datetime(6) not null, version bigint not null, constraint pk_vehicle_driver primary key (id) ); -create sequence vehicle_driver_seq; create table warehouses ( - id integer not null, + id integer auto_increment not null, officezoneid integer, constraint pk_warehouses primary key (id) ); -create sequence warehouses_seq; create table warehousesshippingzones ( warehouseid integer not null, @@ -1853,394 +2704,757 @@ create table warehousesshippingzones ( ); create table sa_wheel ( - id bigint not null, + id bigint auto_increment not null, tire bigint, car bigint, version integer not null, constraint pk_sa_wheel primary key (id) ); -create sequence sa_wheel_seq; - -create table sp_car_wheel ( - id bigint not null, - version integer not null, - constraint pk_sp_car_wheel primary key (id) -); -create sequence sp_car_wheel_seq; create table wheel ( - id bigint not null, + id bigint auto_increment not null, version integer not null, constraint pk_wheel primary key (id) ); -create sequence wheel_seq; + +create table sp_car_wheel ( + id bigint auto_increment not null, + version integer not null, + constraint pk_sp_car_wheel primary key (id) +); + +create table g_who_props_otm ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + who_created_id bigint, + who_modified_id bigint, + constraint pk_g_who_props_otm primary key (id) +); create table with_zero ( - id bigint not null, + id bigint auto_increment not null, name varchar(255), parent_id integer, + lang varchar(2) default 'en' not null, version bigint not null, constraint pk_with_zero primary key (id) ); -create sequence with_zero_seq; create table parent ( - id integer not null, + id integer auto_increment not null, name varchar(255), constraint pk_parent primary key (id) ); -create sequence parent_seq; create table wview ( - id binary(16) not null, - name varchar(255) not null, + id varchar(40) not null, + name varchar(127) not null, constraint uq_wview_name unique (name), constraint pk_wview primary key (id) ); create table zones ( type varchar(31) not null, - id integer not null, + id integer auto_increment not null, attribute varchar(255), constraint pk_zones primary key (id) ); -create sequence zones_seq; -alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id) on delete restrict on update restrict; +create index ix_contact_last_name_first_name on contact (last_name,first_name); +create index ix_e_basic_name on e_basic (name); create index ix_bar_foo_id on bar (foo_id); +alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id) on delete restrict on update restrict; + +create index ix_addr_employee_id on addr (employee_id); +alter table addr add constraint fk_addr_employee_id foreign key (employee_id) references empl (id) on delete restrict on update restrict; -alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code) on delete restrict on update restrict; create index ix_o_address_country_code on o_address (country_code); +alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code) on delete restrict on update restrict; -alter table animals add constraint fk_animals_shelter_id foreign key (shelter_id) references animal_shelter (id) on delete restrict on update restrict; -create index ix_animals_shelter_id on animals (shelter_id); +alter table album add constraint fk_album_cover_id foreign key (cover_id) references cover (id) on delete restrict on update restrict; -alter table attribute add constraint fk_attribute_attribute_holder_1 foreign key (attribute_holder_id) references attribute_holder (id) on delete restrict on update restrict; -create index ix_attribute_attribute_holder_1 on attribute (attribute_holder_id); +create index ix_animal_shelter_id on animal (shelter_id); +alter table animal add constraint fk_animal_shelter_id foreign key (shelter_id) references animal_shelter (id) on delete restrict on update restrict; + +create index ix_attribute_attribute_holder_id on attribute (attribute_holder_id); +alter table attribute add constraint fk_attribute_attribute_holder_id foreign key (attribute_holder_id) references attribute_holder (id) on delete restrict on update restrict; -alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id) on delete restrict on update restrict; create index ix_bbookmark_user_id on bbookmark (user_id); +alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id) on delete restrict on update restrict; + +create index ix_bsite_user_site_id on bsite_user (site_id); +alter table bsite_user add constraint fk_bsite_user_site_id foreign key (site_id) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_user_id on bsite_user (user_id); +alter table bsite_user add constraint fk_bsite_user_user_id foreign key (user_id) references buser (id) on delete restrict on update restrict; + +create index ix_bsite_user_b_site on bsite_user_b (site); +alter table bsite_user_b add constraint fk_bsite_user_b_site foreign key (site) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_b_usr on bsite_user_b (usr); +alter table bsite_user_b add constraint fk_bsite_user_b_usr foreign key (usr) references buser (id) on delete restrict on update restrict; + +create index ix_bsite_user_c_site_uid on bsite_user_c (site_uid); +alter table bsite_user_c add constraint fk_bsite_user_c_site_uid foreign key (site_uid) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_c_user_uid on bsite_user_c (user_uid); +alter table bsite_user_c add constraint fk_bsite_user_c_user_uid foreign key (user_uid) references buser (id) on delete restrict on update restrict; alter table drel_booking add constraint fk_drel_booking_agent_invoice foreign key (agent_invoice) references drel_invoice (id) on delete restrict on update restrict; alter table drel_booking add constraint fk_drel_booking_client_invoice foreign key (client_invoice) references drel_invoice (id) on delete restrict on update restrict; -alter table ckey_detail add constraint fk_ckey_detail_ckey_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key) on delete restrict on update restrict; -create index ix_ckey_detail_one_key_two_key on ckey_detail (one_key,two_key); +create index ix_ckey_detail_parent on ckey_detail (one_key,two_key); +alter table ckey_detail add constraint fk_ckey_detail_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key) on delete restrict on update restrict; -alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id) on delete restrict on update restrict; create index ix_ckey_parent_assoc_id on ckey_parent (assoc_id); +alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id) on delete restrict on update restrict; -alter table calculation_result add constraint fk_calculation_result_product_1 foreign key (product_configuration_id) references configuration (id) on delete restrict on update restrict; -create index ix_calculation_result_product_1 on calculation_result (product_configuration_id); +create index ix_calculation_result_product_configuration_id on calculation_result (product_configuration_id); +alter table calculation_result add constraint fk_calculation_result_product_configuration_id foreign key (product_configuration_id) references configuration (id) on delete restrict on update restrict; -alter table calculation_result add constraint fk_calculation_result_group_c_2 foreign key (group_configuration_id) references configuration (id) on delete restrict on update restrict; -create index ix_calculation_result_group_c_2 on calculation_result (group_configuration_id); +create index ix_calculation_result_group_configuration_id on calculation_result (group_configuration_id); +alter table calculation_result add constraint fk_calculation_result_group_configuration_id foreign key (group_configuration_id) references configuration (id) on delete restrict on update restrict; +create index ix_sp_car_car_wheels_sp_car_car on sp_car_car_wheels (car); alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_car foreign key (car) references sp_car_car (id) on delete restrict on update restrict; -create index ix_sp_car_car_wheels_car on sp_car_car_wheels (car); -alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_w_2 foreign key (wheel) references sp_car_wheel (id) on delete restrict on update restrict; -create index ix_sp_car_car_wheels_wheel on sp_car_car_wheels (wheel); +create index ix_sp_car_car_wheels_sp_car_wheel on sp_car_car_wheels (wheel); +alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_wheel foreign key (wheel) references sp_car_wheel (id) on delete restrict on update restrict; + +create index ix_car_accessory_fuse_id on car_accessory (fuse_id); +alter table car_accessory add constraint fk_car_accessory_fuse_id foreign key (fuse_id) references car_fuse (id) on delete restrict on update restrict; -alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id) on delete restrict on update restrict; create index ix_car_accessory_car_id on car_accessory (car_id); +alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id) on delete restrict on update restrict; -alter table configuration add constraint fk_configuration_configuratio_1 foreign key (configurations_id) references configurations (id) on delete restrict on update restrict; -create index ix_configuration_configuratio_1 on configuration (configurations_id); +create index ix_category_surveyobjectid on category (surveyobjectid); +alter table category add constraint fk_category_surveyobjectid foreign key (surveyobjectid) references survey (id) on delete restrict on update restrict; + +create index ix_child_person_some_bean_id on child_person (some_bean_id); +alter table child_person add constraint fk_child_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_child_person_parent_identifier on child_person (parent_identifier); +alter table child_person add constraint fk_child_person_parent_identifier foreign key (parent_identifier) references parent_person (identifier) on delete restrict on update restrict; + +create index ix_configuration_configurations_id on configuration (configurations_id); +alter table configuration add constraint fk_configuration_configurations_id foreign key (configurations_id) references configurations (id) on delete restrict on update restrict; -alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id) on delete restrict on update restrict; create index ix_contact_customer_id on contact (customer_id); +alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id) on delete restrict on update restrict; -alter table contact add constraint fk_contact_group_id foreign key (group_id) references contact_group (id) on delete restrict on update restrict; create index ix_contact_group_id on contact (group_id); +alter table contact add constraint fk_contact_group_id foreign key (group_id) references contact_group (id) on delete restrict on update restrict; -alter table contact_note add constraint fk_contact_note_contact_id foreign key (contact_id) references contact (id) on delete restrict on update restrict; create index ix_contact_note_contact_id on contact_note (contact_id); +alter table contact_note add constraint fk_contact_note_contact_id foreign key (contact_id) references contact (id) on delete restrict on update restrict; -alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; create index ix_c_conversation_group_id on c_conversation (group_id); +alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; -alter table o_customer add constraint fk_o_customer_billing_address_1 foreign key (billing_address_id) references o_address (id) on delete restrict on update restrict; -create index ix_o_customer_billing_address_1 on o_customer (billing_address_id); +create index ix_o_customer_billing_address_id on o_customer (billing_address_id); +alter table o_customer add constraint fk_o_customer_billing_address_id foreign key (billing_address_id) references o_address (id) on delete restrict on update restrict; -alter table o_customer add constraint fk_o_customer_shipping_addres_2 foreign key (shipping_address_id) references o_address (id) on delete restrict on update restrict; -create index ix_o_customer_shipping_addres_2 on o_customer (shipping_address_id); +create index ix_o_customer_shipping_address_id on o_customer (shipping_address_id); +alter table o_customer add constraint fk_o_customer_shipping_address_id foreign key (shipping_address_id) references o_address (id) on delete restrict on update restrict; + +create index ix_dcredit_drol_dcredit on dcredit_drol (dcredit_id); +alter table dcredit_drol add constraint fk_dcredit_drol_dcredit foreign key (dcredit_id) references dcredit (id) on delete restrict on update restrict; + +create index ix_dcredit_drol_drol on dcredit_drol (drol_id); +alter table dcredit_drol add constraint fk_dcredit_drol_drol foreign key (drol_id) references drol (id) on delete restrict on update restrict; + +create index ix_drot_drol_drot on drot_drol (drot_id); +alter table drot_drol add constraint fk_drot_drol_drot foreign key (drot_id) references drot (id) on delete restrict on update restrict; + +create index ix_drot_drol_drol on drot_drol (drol_id); +alter table drot_drol add constraint fk_drot_drol_drol foreign key (drol_id) references drol (id) on delete restrict on update restrict; + +create index ix_dfk_cascade_one_id on dfk_cascade (one_id); +alter table dfk_cascade add constraint fk_dfk_cascade_one_id foreign key (one_id) references dfk_cascade_one (id) on delete cascade on update cascade; + +create index ix_dfk_set_null_one_id on dfk_set_null (one_id); +alter table dfk_set_null add constraint fk_dfk_set_null_one_id foreign key (one_id) references dfk_one (id) on delete set null on update set null; + +alter table doc add constraint fk_doc_id foreign key (id) references doc_draft (id) on delete restrict on update restrict; + +create index ix_doc_link_doc on doc_link (doc_id); +alter table doc_link add constraint fk_doc_link_doc foreign key (doc_id) references doc (id) on delete restrict on update restrict; + +create index ix_doc_link_link on doc_link (link_id); +alter table doc_link add constraint fk_doc_link_link foreign key (link_id) references link (id) on delete restrict on update restrict; + +alter table document add constraint fk_document_id foreign key (id) references document_draft (id) on delete restrict on update restrict; + +create index ix_document_organisation_id on document (organisation_id); +alter table document add constraint fk_document_organisation_id foreign key (organisation_id) references organisation (id) on delete restrict on update restrict; + +create index ix_document_draft_organisation_id on document_draft (organisation_id); +alter table document_draft add constraint fk_document_draft_organisation_id foreign key (organisation_id) references organisation (id) on delete restrict on update restrict; + +create index ix_document_media_document_id on document_media (document_id); +alter table document_media add constraint fk_document_media_document_id foreign key (document_id) references document (id) on delete restrict on update restrict; + +create index ix_document_media_draft_document_id on document_media_draft (document_id); +alter table document_media_draft add constraint fk_document_media_draft_document_id foreign key (document_id) references document_draft (id) on delete restrict on update restrict; + +create index ix_ebasic_json_map_detail_owner_id on ebasic_json_map_detail (owner_id); +alter table ebasic_json_map_detail add constraint fk_ebasic_json_map_detail_owner_id foreign key (owner_id) references ebasic_json_map (id) on delete restrict on update restrict; + +create index ix_ebasic_no_sdchild_owner_id on ebasic_no_sdchild (owner_id); +alter table ebasic_no_sdchild add constraint fk_ebasic_no_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id) on delete restrict on update restrict; + +create index ix_ebasic_sdchild_owner_id on ebasic_sdchild (owner_id); +alter table ebasic_sdchild add constraint fk_ebasic_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id) on delete restrict on update restrict; -alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id) on delete restrict on update restrict; create index ix_eemb_inner_outer_id on eemb_inner (outer_id); +alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id) on delete restrict on update restrict; -alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id) on delete restrict on update restrict; create index ix_einvoice_person_id on einvoice (person_id); +alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id) on delete restrict on update restrict; -alter table enull_collection_detail add constraint fk_enull_collection_detail_en_1 foreign key (enull_collection_id) references enull_collection (id) on delete restrict on update restrict; -create index ix_enull_collection_detail_en_1 on enull_collection_detail (enull_collection_id); +create index ix_enull_collection_detail_enull_collection_id on enull_collection_detail (enull_collection_id); +alter table enull_collection_detail add constraint fk_enull_collection_detail_enull_collection_id foreign key (enull_collection_id) references enull_collection (id) on delete restrict on update restrict; -alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id) on delete restrict on update restrict; create index ix_eopt_one_a_b_id on eopt_one_a (b_id); +alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id) on delete restrict on update restrict; -alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id) on delete restrict on update restrict; create index ix_eopt_one_b_c_id on eopt_one_b (c_id); +alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id) on delete restrict on update restrict; -alter table evanilla_collection_detail add constraint fk_evanilla_collection_detail_1 foreign key (evanilla_collection_id) references evanilla_collection (id) on delete restrict on update restrict; -create index ix_evanilla_collection_detail_1 on evanilla_collection_detail (evanilla_collection_id); +create index ix_esoft_del_book_lend_by_id on esoft_del_book (lend_by_id); +alter table esoft_del_book add constraint fk_esoft_del_book_lend_by_id foreign key (lend_by_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_esoft_del_user_esoft_del_book on esoft_del_book_esoft_del_user (esoft_del_book_id); +alter table esoft_del_book_esoft_del_user add constraint fk_esoft_del_book_esoft_del_user_esoft_del_book foreign key (esoft_del_book_id) references esoft_del_book (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_esoft_del_user_esoft_del_user on esoft_del_book_esoft_del_user (esoft_del_user_id); +alter table esoft_del_book_esoft_del_user add constraint fk_esoft_del_book_esoft_del_user_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_down_esoft_del_mid_id on esoft_del_down (esoft_del_mid_id); +alter table esoft_del_down add constraint fk_esoft_del_down_esoft_del_mid_id foreign key (esoft_del_mid_id) references esoft_del_mid (id) on delete restrict on update restrict; + +create index ix_esoft_del_mid_top_id on esoft_del_mid (top_id); +alter table esoft_del_mid add constraint fk_esoft_del_mid_top_id foreign key (top_id) references esoft_del_top (id) on delete restrict on update restrict; + +create index ix_esoft_del_mid_up_id on esoft_del_mid (up_id); +alter table esoft_del_mid add constraint fk_esoft_del_mid_up_id foreign key (up_id) references esoft_del_up (id) on delete restrict on update restrict; + +alter table esoft_del_one_a add constraint fk_esoft_del_one_a_oneb_id foreign key (oneb_id) references esoft_del_one_b (id) on delete restrict on update restrict; + +create index ix_esoft_del_role_esoft_del_user_esoft_del_role on esoft_del_role_esoft_del_user (esoft_del_role_id); +alter table esoft_del_role_esoft_del_user add constraint fk_esoft_del_role_esoft_del_user_esoft_del_role foreign key (esoft_del_role_id) references esoft_del_role (id) on delete restrict on update restrict; + +create index ix_esoft_del_role_esoft_del_user_esoft_del_user on esoft_del_role_esoft_del_user (esoft_del_user_id); +alter table esoft_del_role_esoft_del_user add constraint fk_esoft_del_role_esoft_del_user_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_user_esoft_del_role_esoft_del_user on esoft_del_user_esoft_del_role (esoft_del_user_id); +alter table esoft_del_user_esoft_del_role add constraint fk_esoft_del_user_esoft_del_role_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_user_esoft_del_role_esoft_del_role on esoft_del_user_esoft_del_role (esoft_del_role_id); +alter table esoft_del_user_esoft_del_role add constraint fk_esoft_del_user_esoft_del_role_esoft_del_role foreign key (esoft_del_role_id) references esoft_del_role (id) on delete restrict on update restrict; + +create index ix_rawinherit_uncle_parent_id on rawinherit_uncle (parent_id); +alter table rawinherit_uncle add constraint fk_rawinherit_uncle_parent_id foreign key (parent_id) references rawinherit_parent (id) on delete restrict on update restrict; + +create index ix_evanilla_collection_detail_evanilla_collection_id on evanilla_collection_detail (evanilla_collection_id); +alter table evanilla_collection_detail add constraint fk_evanilla_collection_detail_evanilla_collection_id foreign key (evanilla_collection_id) references evanilla_collection (id) on delete restrict on update restrict; -alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id) on delete restrict on update restrict; create index ix_td_child_parent_id on td_child (parent_id); +alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id) on delete restrict on update restrict; + +create index ix_empl_default_address_id on empl (default_address_id); +alter table empl add constraint fk_empl_default_address_id foreign key (default_address_id) references addr (id) on delete restrict on update restrict; + +create index ix_grand_parent_person_some_bean_id on grand_parent_person (some_bean_id); +alter table grand_parent_person add constraint fk_grand_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_survey_group_categoryobjectid on survey_group (categoryobjectid); +alter table survey_group add constraint fk_survey_group_categoryobjectid foreign key (categoryobjectid) references category (id) on delete restrict on update restrict; + +create index ix_hx_link_doc_hx_link on hx_link_doc (hx_link_id); +alter table hx_link_doc add constraint fk_hx_link_doc_hx_link foreign key (hx_link_id) references hx_link (id) on delete restrict on update restrict; + +create index ix_hx_link_doc_he_doc on hx_link_doc (he_doc_id); +alter table hx_link_doc add constraint fk_hx_link_doc_he_doc foreign key (he_doc_id) references he_doc (id) on delete restrict on update restrict; + +create index ix_hi_link_doc_hi_link on hi_link_doc (hi_link_id); +alter table hi_link_doc add constraint fk_hi_link_doc_hi_link foreign key (hi_link_id) references hi_link (id) on delete restrict on update restrict; + +create index ix_hi_link_doc_hi_doc on hi_link_doc (hi_doc_id); +alter table hi_link_doc add constraint fk_hi_link_doc_hi_doc foreign key (hi_doc_id) references hi_doc (id) on delete restrict on update restrict; -alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id) on delete restrict on update restrict; create index ix_imrelated_owner_id on imrelated (owner_id); +alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id) on delete restrict on update restrict; -alter table info_contact add constraint fk_info_contact_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; create index ix_info_contact_company_id on info_contact (company_id); +alter table info_contact add constraint fk_info_contact_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; alter table info_customer add constraint fk_info_customer_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; alter table inner_report add constraint fk_inner_report_forecast_id foreign key (forecast_id) references stockforecast (id) on delete restrict on update restrict; -alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id) on delete restrict on update restrict; create index ix_drel_invoice_booking on drel_invoice (booking); +alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id) on delete restrict on update restrict; -alter table item add constraint fk_item_type foreign key (customer,type) references type (customer,type) on delete restrict on update restrict; -create index ix_item_customer_type on item (customer,type); +create index ix_item_etype on item (customer,type); +alter table item add constraint fk_item_etype foreign key (customer,type) references type (customer,type) on delete restrict on update restrict; -alter table item add constraint fk_item_region foreign key (customer,region) references region (customer,type) on delete restrict on update restrict; -create index ix_item_customer_region on item (customer,region); +create index ix_item_eregion on item (customer,region); +alter table item add constraint fk_item_eregion foreign key (customer,region) references region (customer,type) on delete restrict on update restrict; +alter table trainer_monkey add constraint fk_trainer_monkey_trainer foreign key (trainer_tid) references trainer (tid) on delete restrict on update restrict; + +alter table trainer_monkey add constraint fk_trainer_monkey_monkey foreign key (monkey_mid) references monkey (mid) on delete restrict on update restrict; + +alter table troop_monkey add constraint fk_troop_monkey_troop foreign key (troop_pid) references troop (pid) on delete restrict on update restrict; + +alter table troop_monkey add constraint fk_troop_monkey_monkey foreign key (monkey_mid) references monkey (mid) on delete restrict on update restrict; + +create index ix_l2_cldf_reset_bean_child_parent_id on l2_cldf_reset_bean_child (parent_id); +alter table l2_cldf_reset_bean_child add constraint fk_l2_cldf_reset_bean_child_parent_id foreign key (parent_id) references l2_cldf_reset_bean (id) on delete restrict on update restrict; + +create index ix_level1_level4_level1 on level1_level4 (level1_id); alter table level1_level4 add constraint fk_level1_level4_level1 foreign key (level1_id) references level1 (id) on delete restrict on update restrict; -create index ix_level1_level4_level1_id on level1_level4 (level1_id); +create index ix_level1_level4_level4 on level1_level4 (level4_id); alter table level1_level4 add constraint fk_level1_level4_level4 foreign key (level4_id) references level4 (id) on delete restrict on update restrict; -create index ix_level1_level4_level4_id on level1_level4 (level4_id); +create index ix_level1_level2_level1 on level1_level2 (level1_id); alter table level1_level2 add constraint fk_level1_level2_level1 foreign key (level1_id) references level1 (id) on delete restrict on update restrict; -create index ix_level1_level2_level1_id on level1_level2 (level1_id); +create index ix_level1_level2_level2 on level1_level2 (level2_id); alter table level1_level2 add constraint fk_level1_level2_level2 foreign key (level2_id) references level2 (id) on delete restrict on update restrict; -create index ix_level1_level2_level2_id on level1_level2 (level2_id); +create index ix_level2_level3_level2 on level2_level3 (level2_id); alter table level2_level3 add constraint fk_level2_level3_level2 foreign key (level2_id) references level2 (id) on delete restrict on update restrict; -create index ix_level2_level3_level2_id on level2_level3 (level2_id); +create index ix_level2_level3_level3 on level2_level3 (level3_id); alter table level2_level3 add constraint fk_level2_level3_level3 foreign key (level3_id) references level3 (id) on delete restrict on update restrict; -create index ix_level2_level3_level3_id on level2_level3 (level3_id); -alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_la_1 foreign key (la_attr_value_id) references la_attr_value (id) on delete restrict on update restrict; -create index ix_la_attr_value_attribute_la_1 on la_attr_value_attribute (la_attr_value_id); +alter table link add constraint fk_link_id foreign key (id) references link_draft (id) on delete restrict on update restrict; -alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_at_2 foreign key (attribute_id) references attribute (id) on delete restrict on update restrict; -create index ix_la_attr_value_attribute_at_2 on la_attr_value_attribute (attribute_id); +create index ix_la_attr_value_attribute_la_attr_value on la_attr_value_attribute (la_attr_value_id); +alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_la_attr_value foreign key (la_attr_value_id) references la_attr_value (id) on delete restrict on update restrict; + +create index ix_la_attr_value_attribute_attribute on la_attr_value_attribute (attribute_id); +alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_attribute foreign key (attribute_id) references attribute (id) on delete restrict on update restrict; -alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id) on delete restrict on update restrict; create index ix_mprinter_current_state_id on mprinter (current_state_id); +alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_cyan_id foreign key (last_swap_cyan_id) references mprinter_state (id) on delete restrict on update restrict; -alter table mprinter add constraint fk_mprinter_last_swap_magenta_3 foreign key (last_swap_magenta_id) references mprinter_state (id) on delete restrict on update restrict; +alter table mprinter add constraint fk_mprinter_last_swap_magenta_id foreign key (last_swap_magenta_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_yellow_id foreign key (last_swap_yellow_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_black_id foreign key (last_swap_black_id) references mprinter_state (id) on delete restrict on update restrict; -alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id) on delete restrict on update restrict; create index ix_mprinter_state_printer_id on mprinter_state (printer_id); +alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id) on delete restrict on update restrict; -alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_id) references mmedia (id) on delete restrict on update restrict; create index ix_mprofile_picture_id on mprofile (picture_id); +alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_id) references mmedia (id) on delete restrict on update restrict; +create index ix_mrole_muser_mrole on mrole_muser (mrole_roleid); alter table mrole_muser add constraint fk_mrole_muser_mrole foreign key (mrole_roleid) references mrole (roleid) on delete restrict on update restrict; -create index ix_mrole_muser_mrole_roleid on mrole_muser (mrole_roleid); +create index ix_mrole_muser_muser on mrole_muser (muser_userid); alter table mrole_muser add constraint fk_mrole_muser_muser foreign key (muser_userid) references muser (userid) on delete restrict on update restrict; -create index ix_mrole_muser_muser_userid on mrole_muser (muser_userid); -alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id) on delete restrict on update restrict; create index ix_muser_user_type_id on muser (user_type_id); +alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id) on delete restrict on update restrict; + +create index ix_mail_user_inbox_mail_user on mail_user_inbox (mail_user_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_user foreign key (mail_user_id) references mail_user (id) on delete restrict on update restrict; + +create index ix_mail_user_inbox_mail_box on mail_user_inbox (mail_box_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_box foreign key (mail_box_id) references mail_box (id) on delete restrict on update restrict; + +create index ix_mail_user_outbox_mail_user on mail_user_outbox (mail_user_id); +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_user foreign key (mail_user_id) references mail_user (id) on delete restrict on update restrict; + +create index ix_mail_user_outbox_mail_box on mail_user_outbox (mail_box_id); +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_box foreign key (mail_box_id) references mail_box (id) on delete restrict on update restrict; -alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; create index ix_c_message_conversation_id on c_message (conversation_id); +alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; create index ix_c_message_user_id on c_message (user_id); +alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; -alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_u_1 foreign key (mnoc_user_user_id) references mnoc_user (user_id) on delete restrict on update restrict; -create index ix_mnoc_user_mnoc_role_mnoc_u_1 on mnoc_user_mnoc_role (mnoc_user_user_id); +create index ix_mnoc_user_mnoc_role_mnoc_user on mnoc_user_mnoc_role (mnoc_user_user_id); +alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_user foreign key (mnoc_user_user_id) references mnoc_user (user_id) on delete restrict on update restrict; -alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_r_2 foreign key (mnoc_role_role_id) references mnoc_role (role_id) on delete restrict on update restrict; -create index ix_mnoc_user_mnoc_role_mnoc_r_2 on mnoc_user_mnoc_role (mnoc_role_role_id); +create index ix_mnoc_user_mnoc_role_mnoc_role on mnoc_user_mnoc_role (mnoc_role_role_id); +alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_role foreign key (mnoc_role_role_id) references mnoc_role (role_id) on delete restrict on update restrict; + +create index ix_mny_b_a_id on mny_b (a_id); +alter table mny_b add constraint fk_mny_b_a_id foreign key (a_id) references mny_a (id) on delete restrict on update restrict; + +create index ix_mny_b_mny_c_mny_b on mny_b_mny_c (mny_b_id); +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_b foreign key (mny_b_id) references mny_b (id) on delete restrict on update restrict; + +create index ix_mny_b_mny_c_mny_c on mny_b_mny_c (mny_c_id); +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_c foreign key (mny_c_id) references mny_c (id) on delete restrict on update restrict; + +create index ix_subtopics_mny_topic_1 on subtopics (topic); +alter table subtopics add constraint fk_subtopics_mny_topic_1 foreign key (topic) references mny_topic (id) on delete restrict on update restrict; + +create index ix_subtopics_mny_topic_2 on subtopics (subtopic); +alter table subtopics add constraint fk_subtopics_mny_topic_2 foreign key (subtopic) references mny_topic (id) on delete restrict on update restrict; -alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id) on delete restrict on update restrict; create index ix_mp_role_mp_user_id on mp_role (mp_user_id); +alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id) on delete restrict on update restrict; -alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_pare_1 foreign key (parent_id) references my_lob_size (id) on delete restrict on update restrict; -create index ix_my_lob_size_join_many_pare_1 on my_lob_size_join_many (parent_id); +create index ix_ms_many_a_many_b_ms_many_a on ms_many_a_many_b (ms_many_a_aid); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid) on delete restrict on update restrict; -alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_ca_1 foreign key (o_cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; -create index ix_o_cached_bean_country_o_ca_1 on o_cached_bean_country (o_cached_bean_id); +create index ix_ms_many_a_many_b_ms_many_b on ms_many_a_many_b (ms_many_b_bid); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid) on delete restrict on update restrict; -alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_co_2 foreign key (o_country_code) references o_country (code) on delete restrict on update restrict; -create index ix_o_cached_bean_country_o_co_2 on o_cached_bean_country (o_country_code); +create index ix_ms_many_b_many_a_ms_many_b on ms_many_b_many_a (ms_many_b_bid); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid) on delete restrict on update restrict; -alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cached_1 foreign key (cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; -create index ix_o_cached_bean_child_cached_1 on o_cached_bean_child (cached_bean_id); +create index ix_ms_many_b_many_a_ms_many_a on ms_many_b_many_a (ms_many_a_aid); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid) on delete restrict on update restrict; + +create index ix_my_lob_size_join_many_parent_id on my_lob_size_join_many (parent_id); +alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_parent_id foreign key (parent_id) references my_lob_size (id) on delete restrict on update restrict; + +create index ix_o_cached_bean_country_o_cached_bean on o_cached_bean_country (o_cached_bean_id); +alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_cached_bean foreign key (o_cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; + +create index ix_o_cached_bean_country_o_country on o_cached_bean_country (o_country_code); +alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_country foreign key (o_country_code) references o_country (code) on delete restrict on update restrict; + +create index ix_o_cached_bean_child_cached_bean_id on o_cached_bean_child (cached_bean_id); +alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cached_bean_id foreign key (cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; alter table oengine add constraint fk_oengine_car_id foreign key (car_id) references ocar (id) on delete restrict on update restrict; alter table ogear_box add constraint fk_ogear_box_car_id foreign key (car_id) references ocar (id) on delete restrict on update restrict; -alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id) on delete restrict on update restrict; +alter table oroad_show_msg add constraint fk_oroad_show_msg_company_id foreign key (company_id) references ocompany (id) on delete restrict on update restrict; + +create index ix_om_ordered_detail_master_id on om_ordered_detail (master_id); +alter table om_ordered_detail add constraint fk_om_ordered_detail_master_id foreign key (master_id) references om_ordered_master (id) on delete restrict on update restrict; + create index ix_o_order_kcustomer_id on o_order (kcustomer_id); +alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id) on delete restrict on update restrict; -alter table o_order_detail add constraint fk_o_order_detail_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; create index ix_o_order_detail_order_id on o_order_detail (order_id); +alter table o_order_detail add constraint fk_o_order_detail_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; -alter table o_order_detail add constraint fk_o_order_detail_product_id foreign key (product_id) references o_product (id) on delete restrict on update restrict; create index ix_o_order_detail_product_id on o_order_detail (product_id); +alter table o_order_detail add constraint fk_o_order_detail_product_id foreign key (product_id) references o_product (id) on delete restrict on update restrict; -alter table s_order_items add constraint fk_s_order_items_order_uuid foreign key (order_uuid) references s_orders (uuid) on delete restrict on update restrict; create index ix_s_order_items_order_uuid on s_order_items (order_uuid); +alter table s_order_items add constraint fk_s_order_items_order_uuid foreign key (order_uuid) references s_orders (uuid) on delete restrict on update restrict; -alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; create index ix_or_order_ship_order_id on or_order_ship (order_id); +alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; + +alter table oto_bchild add constraint fk_oto_bchild_master_id foreign key (master_id) references oto_bmaster (id) on delete restrict on update restrict; alter table oto_child add constraint fk_oto_child_master_id foreign key (master_id) references oto_master (id) on delete restrict on update restrict; +alter table oto_cust_address add constraint fk_oto_cust_address_customer_cid foreign key (customer_cid) references oto_cust (cid) on delete restrict on update restrict; + +alter table oto_prime_extra add constraint fk_oto_prime_extra_eid foreign key (eid) references oto_prime (pid) on delete restrict on update restrict; + +create index ix_oto_th_many_oto_th_top_id on oto_th_many (oto_th_top_id); +alter table oto_th_many add constraint fk_oto_th_many_oto_th_top_id foreign key (oto_th_top_id) references oto_th_top (id) on delete restrict on update restrict; + +alter table oto_th_one add constraint fk_oto_th_one_many_id foreign key (many_id) references oto_th_many (id) on delete restrict on update restrict; + +alter table oto_ubprime_extra add constraint fk_oto_ubprime_extra_eid foreign key (eid) references oto_ubprime (pid) on delete restrict on update restrict; + +alter table oto_uprime_extra add constraint fk_oto_uprime_extra_eid foreign key (eid) references oto_uprime (pid) on delete restrict on update restrict; + alter table pfile add constraint fk_pfile_file_content_id foreign key (file_content_id) references pfile_content (id) on delete restrict on update restrict; alter table pfile add constraint fk_pfile_file_content2_id foreign key (file_content2_id) references pfile_content (id) on delete restrict on update restrict; alter table paggview add constraint fk_paggview_pview_id foreign key (pview_id) references pp (id) on delete restrict on update restrict; -alter table pallet_location add constraint fk_pallet_location_zone_sid foreign key (zone_sid) references zones (id) on delete restrict on update restrict; create index ix_pallet_location_zone_sid on pallet_location (zone_sid); +alter table pallet_location add constraint fk_pallet_location_zone_sid foreign key (zone_sid) references zones (id) on delete restrict on update restrict; alter table parcel_location add constraint fk_parcel_location_parcelid foreign key (parcelid) references parcel (parcelid) on delete restrict on update restrict; -alter table rawinherit_parent_rawinherit_dat add constraint fk_rawinherit_parent_rawinher_1 foreign key (rawinherit_parent_id) references rawinherit_parent (id) on delete restrict on update restrict; -create index ix_rawinherit_parent_rawinher_1 on rawinherit_parent_rawinherit_dat (rawinherit_parent_id); +create index ix_rawinherit_parent_rawinherit_data_rawinherit_parent on rawinherit_parent_rawinherit_data (rawinherit_parent_id); +alter table rawinherit_parent_rawinherit_data add constraint fk_rawinherit_parent_rawinherit_data_rawinherit_parent foreign key (rawinherit_parent_id) references rawinherit_parent (id) on delete restrict on update restrict; -alter table rawinherit_parent_rawinherit_dat add constraint fk_rawinherit_parent_rawinher_2 foreign key (rawinherit_data_id) references rawinherit_data (id) on delete restrict on update restrict; -create index ix_rawinherit_parent_rawinher_2 on rawinherit_parent_rawinherit_dat (rawinherit_data_id); +create index ix_rawinherit_parent_rawinherit_data_rawinherit_data on rawinherit_parent_rawinherit_data (rawinherit_data_id); +alter table rawinherit_parent_rawinherit_data add constraint fk_rawinherit_parent_rawinherit_data_rawinherit_data foreign key (rawinherit_data_id) references rawinherit_data (id) on delete restrict on update restrict; -alter table c_participation add constraint fk_c_participation_conversati_1 foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -create index ix_c_participation_conversati_1 on c_participation (conversation_id); +create index ix_parent_person_some_bean_id on parent_person (some_bean_id); +alter table parent_person add constraint fk_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_parent_person_parent_identifier on parent_person (parent_identifier); +alter table parent_person add constraint fk_parent_person_parent_identifier foreign key (parent_identifier) references grand_parent_person (identifier) on delete restrict on update restrict; + +create index ix_c_participation_conversation_id on c_participation (conversation_id); +alter table c_participation add constraint fk_c_participation_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; create index ix_c_participation_user_id on c_participation (user_id); +alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; -alter table persistent_file_content add constraint fk_persistent_file_content_pe_1 foreign key (persistent_file_id) references persistent_file (id) on delete restrict on update restrict; +alter table persistent_file_content add constraint fk_persistent_file_content_persistent_file_id foreign key (persistent_file_id) references persistent_file (id) on delete restrict on update restrict; -alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid) on delete restrict on update restrict; create index ix_person_default_address_oid on person (default_address_oid); +alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid) on delete restrict on update restrict; -alter table phones add constraint fk_phones_person_id foreign key (person_id) references persons (id) on delete restrict on update restrict; create index ix_phones_person_id on phones (person_id); +alter table phones add constraint fk_phones_person_id foreign key (person_id) references persons (id) on delete restrict on update restrict; +create index ix_pp_to_ww_pp on pp_to_ww (pp_id); alter table pp_to_ww add constraint fk_pp_to_ww_pp foreign key (pp_id) references pp (id) on delete restrict on update restrict; -create index ix_pp_to_ww_pp_id on pp_to_ww (pp_id); +create index ix_pp_to_ww_wview on pp_to_ww (ww_id); alter table pp_to_ww add constraint fk_pp_to_ww_wview foreign key (ww_id) references wview (id) on delete restrict on update restrict; -create index ix_pp_to_ww_ww_id on pp_to_ww (ww_id); -alter table r_orders add constraint fk_r_orders_rcustomer foreign key (company,customername) references rcustomer (company,name) on delete restrict on update restrict; -create index ix_r_orders_company_customern_1 on r_orders (company,customername); +create index ix_question_groupobjectid on question (groupobjectid); +alter table question add constraint fk_question_groupobjectid foreign key (groupobjectid) references survey_group (id) on delete restrict on update restrict; -alter table resourcefile add constraint fk_resourcefile_parentresourc_1 foreign key (parentresourcefileid) references resourcefile (id) on delete restrict on update restrict; -create index ix_resourcefile_parentresourc_1 on resourcefile (parentresourcefileid); +create index ix_r_orders_customer on r_orders (company,customername); +alter table r_orders add constraint fk_r_orders_customer foreign key (company,customername) references rcustomer (company,name) on delete restrict on update restrict; + +create index ix_resourcefile_parentresourcefileid on resourcefile (parentresourcefileid); +alter table resourcefile add constraint fk_resourcefile_parentresourcefileid foreign key (parentresourcefileid) references resourcefile (id) on delete restrict on update restrict; -alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id) on delete restrict on update restrict; create index ix_mt_role_tenant_id on mt_role (tenant_id); +alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id) on delete restrict on update restrict; +create index ix_mt_role_permission_mt_role on mt_role_permission (mt_role_id); alter table mt_role_permission add constraint fk_mt_role_permission_mt_role foreign key (mt_role_id) references mt_role (id) on delete restrict on update restrict; -create index ix_mt_role_permission_mt_role_1 on mt_role_permission (mt_role_id); -alter table mt_role_permission add constraint fk_mt_role_permission_mt_perm_2 foreign key (mt_permission_id) references mt_permission (id) on delete restrict on update restrict; -create index ix_mt_role_permission_mt_perm_2 on mt_role_permission (mt_permission_id); +create index ix_mt_role_permission_mt_permission on mt_role_permission (mt_permission_id); +alter table mt_role_permission add constraint fk_mt_role_permission_mt_permission foreign key (mt_permission_id) references mt_permission (id) on delete restrict on update restrict; alter table f_second add constraint fk_f_second_first foreign key (first) references f_first (id) on delete restrict on update restrict; -alter table section add constraint fk_section_article_id foreign key (article_id) references article (id) on delete restrict on update restrict; create index ix_section_article_id on section (article_id); +alter table section add constraint fk_section_article_id foreign key (article_id) references article (id) on delete restrict on update restrict; -alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id) on delete restrict on update restrict; create index ix_self_parent_parent_id on self_parent (parent_id); +alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id) on delete restrict on update restrict; -alter table self_ref_customer add constraint fk_self_ref_customer_referred_1 foreign key (referred_by_id) references self_ref_customer (id) on delete restrict on update restrict; -create index ix_self_ref_customer_referred_1 on self_ref_customer (referred_by_id); +create index ix_self_ref_customer_referred_by_id on self_ref_customer (referred_by_id); +alter table self_ref_customer add constraint fk_self_ref_customer_referred_by_id foreign key (referred_by_id) references self_ref_customer (id) on delete restrict on update restrict; -alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id) on delete restrict on update restrict; create index ix_self_ref_example_parent_id on self_ref_example (parent_id); +alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id) on delete restrict on update restrict; -alter table stockforecast add constraint fk_stockforecast_inner_report_1 foreign key (inner_report_id) references inner_report (id) on delete restrict on update restrict; -create index ix_stockforecast_inner_report_1 on stockforecast (inner_report_id); +create index ix_stockforecast_inner_report_id on stockforecast (inner_report_id); +alter table stockforecast add constraint fk_stockforecast_inner_report_id foreign key (inner_report_id) references inner_report (id) on delete restrict on update restrict; -alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id) on delete restrict on update restrict; create index ix_sub_section_section_id on sub_section (section_id); +alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id) on delete restrict on update restrict; -alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_namexx_1 foreign key (master_id) references t_atable_thatisrelatively (id) on delete restrict on update restrict; -create index ix_t_detail_with_other_namexx_1 on t_detail_with_other_namexxxyy (master_id); +create index ix_tevent_many_event_id on tevent_many (event_id); +alter table tevent_many add constraint fk_tevent_many_event_id foreign key (event_id) references tevent_one (id) on delete restrict on update restrict; + +alter table tevent_one add constraint fk_tevent_one_event_id foreign key (event_id) references tevent (id) on delete restrict on update restrict; + +create index ix_t_detail_with_other_namexxxyy_master_id on t_detail_with_other_namexxxyy (master_id); +alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_namexxxyy_master_id foreign key (master_id) references t_atable_thatisrelatively (id) on delete restrict on update restrict; -alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id) on delete restrict on update restrict; create index ix_ts_detail_two_master_id on ts_detail_two (master_id); +alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id) on delete restrict on update restrict; -alter table twheel add constraint fk_twheel_owner_plate_no foreign key (owner_plate_no) references tcar (plate_no) on delete restrict on update restrict; create index ix_twheel_owner_plate_no on twheel (owner_plate_no); +alter table twheel add constraint fk_twheel_owner_plate_no foreign key (owner_plate_no) references tcar (plate_no) on delete restrict on update restrict; alter table tire add constraint fk_tire_wheel foreign key (wheel) references wheel (id) on delete restrict on update restrict; -alter table trip add constraint fk_trip_vehicle_driver_id foreign key (vehicle_driver_id) references vehicle_driver (id) on delete restrict on update restrict; create index ix_trip_vehicle_driver_id on trip (vehicle_driver_id); +alter table trip add constraint fk_trip_vehicle_driver_id foreign key (vehicle_driver_id) references vehicle_driver (id) on delete restrict on update restrict; -alter table trip add constraint fk_trip_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; create index ix_trip_address_id on trip (address_id); +alter table trip add constraint fk_trip_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; -alter table type add constraint fk_type_sub_type_id foreign key (sub_type_id) references sub_type (sub_type_id) on delete restrict on update restrict; create index ix_type_sub_type_id on type (sub_type_id); +alter table type add constraint fk_type_sub_type_id foreign key (sub_type_id) references sub_type (sub_type_id) on delete restrict on update restrict; -alter table ut_detail add constraint fk_ut_detail_utmaster_id foreign key (utmaster_id) references ut_master (id) on delete restrict on update restrict; create index ix_ut_detail_utmaster_id on ut_detail (utmaster_id); +alter table ut_detail add constraint fk_ut_detail_utmaster_id foreign key (utmaster_id) references ut_master (id) on delete restrict on update restrict; -alter table uutwo add constraint fk_uutwo_master_id foreign key (master_id) references uuone (id) on delete restrict on update restrict; create index ix_uutwo_master_id on uutwo (master_id); +alter table uutwo add constraint fk_uutwo_master_id foreign key (master_id) references uuone (id) on delete restrict on update restrict; -alter table c_user add constraint fk_c_user_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; create index ix_c_user_group_id on c_user (group_id); +alter table c_user add constraint fk_c_user_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; alter table oto_user add constraint fk_oto_user_account_id foreign key (account_id) references oto_account (id) on delete restrict on update restrict; -alter table em_user_role add constraint fk_em_user_role_user_id foreign key (user_id) references em_user (id) on delete restrict on update restrict; create index ix_em_user_role_user_id on em_user_role (user_id); +alter table em_user_role add constraint fk_em_user_role_user_id foreign key (user_id) references em_user (id) on delete restrict on update restrict; -alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id) on delete restrict on update restrict; create index ix_em_user_role_role_id on em_user_role (role_id); +alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id) on delete restrict on update restrict; -alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id) on delete restrict on update restrict; -create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); - -alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id) on delete restrict on update restrict; create index ix_vehicle_car_ref_id on vehicle (car_ref_id); +alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id) on delete restrict on update restrict; + +create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); +alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id) on delete restrict on update restrict; -alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id) on delete restrict on update restrict; create index ix_vehicle_driver_vehicle_id on vehicle_driver (vehicle_id); +alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id) on delete restrict on update restrict; -alter table vehicle_driver add constraint fk_vehicle_driver_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; create index ix_vehicle_driver_address_id on vehicle_driver (address_id); +alter table vehicle_driver add constraint fk_vehicle_driver_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; -alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id) on delete restrict on update restrict; create index ix_warehouses_officezoneid on warehouses (officezoneid); +alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id) on delete restrict on update restrict; -alter table warehousesshippingzones add constraint fk_warehousesshippingzones_wa_1 foreign key (warehouseid) references warehouses (id) on delete restrict on update restrict; -create index ix_warehousesshippingzones_wa_1 on warehousesshippingzones (warehouseid); +create index ix_warehousesshippingzones_warehouses on warehousesshippingzones (warehouseid); +alter table warehousesshippingzones add constraint fk_warehousesshippingzones_warehouses foreign key (warehouseid) references warehouses (id) on delete restrict on update restrict; -alter table warehousesshippingzones add constraint fk_warehousesshippingzones_zo_2 foreign key (shippingzoneid) references zones (id) on delete restrict on update restrict; -create index ix_warehousesshippingzones_sh_2 on warehousesshippingzones (shippingzoneid); +create index ix_warehousesshippingzones_zones on warehousesshippingzones (shippingzoneid); +alter table warehousesshippingzones add constraint fk_warehousesshippingzones_zones foreign key (shippingzoneid) references zones (id) on delete restrict on update restrict; -alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id) on delete restrict on update restrict; create index ix_sa_wheel_tire on sa_wheel (tire); +alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id) on delete restrict on update restrict; -alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id) on delete restrict on update restrict; create index ix_sa_wheel_car on sa_wheel (car); +alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id) on delete restrict on update restrict; + +create index ix_g_who_props_otm_who_created_id on g_who_props_otm (who_created_id); +alter table g_who_props_otm add constraint fk_g_who_props_otm_who_created_id foreign key (who_created_id) references g_user (id) on delete restrict on update restrict; + +create index ix_g_who_props_otm_who_modified_id on g_who_props_otm (who_modified_id); +alter table g_who_props_otm add constraint fk_g_who_props_otm_who_modified_id foreign key (who_modified_id) references g_user (id) on delete restrict on update restrict; -alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id) on delete restrict on update restrict; create index ix_with_zero_parent_id on with_zero (parent_id); +alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id) on delete restrict on update restrict; +alter table hx_link add column sys_period_start datetime(6) default now(6); +alter table hx_link add column sys_period_end datetime(6); +update hx_link set sys_period_start = when_created; +create table hx_link_history( + id bigint, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint, + when_created datetime(6), + when_modified datetime(6), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view hx_link_with_history as select * from hx_link union all select * from hx_link_history; + +delimiter $$ +create trigger hx_link_history_upd before update on hx_link for each row begin + insert into hx_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger hx_link_history_del before delete on hx_link for each row begin + insert into hx_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); +end$$ +alter table hi_link add column sys_period_start datetime(6) default now(6); +alter table hi_link add column sys_period_end datetime(6); +update hi_link set sys_period_start = when_created; +create table hi_link_history( + id bigint, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint, + when_created datetime(6), + when_modified datetime(6), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view hi_link_with_history as select * from hi_link union all select * from hi_link_history; + +delimiter $$ +create trigger hi_link_history_upd before update on hi_link for each row begin + insert into hi_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger hi_link_history_del before delete on hi_link for each row begin + insert into hi_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); +end$$ +alter table hi_link_doc add column sys_period_start datetime(6) default now(6); +alter table hi_link_doc add column sys_period_end datetime(6); +create table hi_link_doc_history( + hi_link_id bigint, + hi_doc_id bigint, + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view hi_link_doc_with_history as select * from hi_link_doc union all select * from hi_link_doc_history; + +delimiter $$ +create trigger hi_link_doc_history_upd before update on hi_link_doc for each row begin + insert into hi_link_doc_history (sys_period_start,sys_period_end,hi_link_id, hi_doc_id) values (OLD.sys_period_start, now(6),OLD.hi_link_id, OLD.hi_doc_id); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger hi_link_doc_history_del before delete on hi_link_doc for each row begin + insert into hi_link_doc_history (sys_period_start,sys_period_end,hi_link_id, hi_doc_id) values (OLD.sys_period_start, now(6),OLD.hi_link_id, OLD.hi_doc_id); +end$$ +alter table link add column sys_period_start datetime(6) default now(6); +alter table link add column sys_period_end datetime(6); +update link set sys_period_start = when_created; +create table link_history( + id bigint, + name varchar(255), + location varchar(255), + when_publish datetime(6), + link_comment varchar(255), + version bigint, + when_created datetime(6), + when_modified datetime(6), + deleted tinyint(1), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view link_with_history as select * from link union all select * from link_history; + +delimiter $$ +create trigger link_history_upd before update on link for each row begin + insert into link_history (sys_period_start,sys_period_end,id, name, location, when_publish, link_comment, version, when_created, when_modified, deleted) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.when_publish, OLD.link_comment, OLD.version, OLD.when_created, OLD.when_modified, OLD.deleted); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger link_history_del before delete on link for each row begin + insert into link_history (sys_period_start,sys_period_end,id, name, location, when_publish, link_comment, version, when_created, when_modified, deleted) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.when_publish, OLD.link_comment, OLD.version, OLD.when_created, OLD.when_modified, OLD.deleted); +end$$ +alter table c_user add column sys_period_start datetime(6) default now(6); +alter table c_user add column sys_period_end datetime(6); +update c_user set sys_period_start = when_created; +create table c_user_history( + id bigint, + inactive tinyint(1), + name varchar(255), + email varchar(255), + password_hash varchar(255), + group_id bigint, + version bigint, + when_created datetime(6), + when_modified datetime(6), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view c_user_with_history as select * from c_user union all select * from c_user_history; + +delimiter $$ +create trigger c_user_history_upd before update on c_user for each row begin + insert into c_user_history (sys_period_start,sys_period_end,id, inactive, name, email, group_id, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.inactive, OLD.name, OLD.email, OLD.group_id, OLD.version, OLD.when_created, OLD.when_modified); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger c_user_history_del before delete on c_user for each row begin + insert into c_user_history (sys_period_start,sys_period_end,id, inactive, name, email, group_id, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.inactive, OLD.name, OLD.email, OLD.group_id, OLD.version, OLD.when_created, OLD.when_modified); +end$$ diff --git a/src/test/ddl-review/h2-drop-all.sql b/src/test/ddl-review/h2-drop-all.sql index 080923655..1113deffc 100644 --- a/src/test/ddl-review/h2-drop-all.sql +++ b/src/test/ddl-review/h2-drop-all.sql @@ -1,780 +1,1140 @@ -alter table bar drop constraint fk_bar_foo_id; -drop index ix_bar_foo_id; +-- Generated by ebean unknown at 2018-03-08T06:41:41.155Z +alter table bar drop foreign key fk_bar_foo_id; +drop index ix_bar_foo_id on bar; -alter table o_address drop constraint fk_o_address_country_code; -drop index ix_o_address_country_code; +alter table addr drop foreign key fk_addr_employee_id; +drop index ix_addr_employee_id on addr; -alter table animals drop constraint fk_animals_shelter_id; -drop index ix_animals_shelter_id; +alter table o_address drop foreign key fk_o_address_country_code; +drop index ix_o_address_country_code on o_address; -alter table attribute drop constraint fk_attribute_attribute_holder_1; -drop index ix_attribute_attribute_holder_1; +alter table album drop foreign key fk_album_cover_id; -alter table bbookmark drop constraint fk_bbookmark_user_id; -drop index ix_bbookmark_user_id; +alter table animal drop foreign key fk_animal_shelter_id; +drop index ix_animal_shelter_id on animal; -alter table drel_booking drop constraint fk_drel_booking_agent_invoice; +alter table attribute drop foreign key fk_attribute_attribute_holder_id; +drop index ix_attribute_attribute_holder_id on attribute; -alter table drel_booking drop constraint fk_drel_booking_client_invoice; +alter table bbookmark drop foreign key fk_bbookmark_user_id; +drop index ix_bbookmark_user_id on bbookmark; -alter table ckey_detail drop constraint fk_ckey_detail_ckey_parent; -drop index ix_ckey_detail_one_key_two_key; +alter table bsite_user drop foreign key fk_bsite_user_site_id; +drop index ix_bsite_user_site_id on bsite_user; -alter table ckey_parent drop constraint fk_ckey_parent_assoc_id; -drop index ix_ckey_parent_assoc_id; +alter table bsite_user drop foreign key fk_bsite_user_user_id; +drop index ix_bsite_user_user_id on bsite_user; -alter table calculation_result drop constraint fk_calculation_result_product_1; -drop index ix_calculation_result_product_1; +alter table bsite_user_b drop foreign key fk_bsite_user_b_site; +drop index ix_bsite_user_b_site on bsite_user_b; -alter table calculation_result drop constraint fk_calculation_result_group_c_2; -drop index ix_calculation_result_group_c_2; +alter table bsite_user_b drop foreign key fk_bsite_user_b_usr; +drop index ix_bsite_user_b_usr on bsite_user_b; -alter table sp_car_car_wheels drop constraint fk_sp_car_car_wheels_sp_car_car; -drop index ix_sp_car_car_wheels_car; +alter table bsite_user_c drop foreign key fk_bsite_user_c_site_uid; +drop index ix_bsite_user_c_site_uid on bsite_user_c; -alter table sp_car_car_wheels drop constraint fk_sp_car_car_wheels_sp_car_w_2; -drop index ix_sp_car_car_wheels_wheel; +alter table bsite_user_c drop foreign key fk_bsite_user_c_user_uid; +drop index ix_bsite_user_c_user_uid on bsite_user_c; -alter table car_accessory drop constraint fk_car_accessory_car_id; -drop index ix_car_accessory_car_id; +alter table drel_booking drop foreign key fk_drel_booking_agent_invoice; -alter table configuration drop constraint fk_configuration_configuratio_1; -drop index ix_configuration_configuratio_1; +alter table drel_booking drop foreign key fk_drel_booking_client_invoice; -alter table contact drop constraint fk_contact_customer_id; -drop index ix_contact_customer_id; +alter table ckey_detail drop foreign key fk_ckey_detail_parent; +drop index ix_ckey_detail_parent on ckey_detail; -alter table contact drop constraint fk_contact_group_id; -drop index ix_contact_group_id; +alter table ckey_parent drop foreign key fk_ckey_parent_assoc_id; +drop index ix_ckey_parent_assoc_id on ckey_parent; -alter table contact_note drop constraint fk_contact_note_contact_id; -drop index ix_contact_note_contact_id; +alter table calculation_result drop foreign key fk_calculation_result_product_configuration_id; +drop index ix_calculation_result_product_configuration_id on calculation_result; -alter table c_conversation drop constraint fk_c_conversation_group_id; -drop index ix_c_conversation_group_id; +alter table calculation_result drop foreign key fk_calculation_result_group_configuration_id; +drop index ix_calculation_result_group_configuration_id on calculation_result; -alter table o_customer drop constraint fk_o_customer_billing_address_1; -drop index ix_o_customer_billing_address_1; +alter table sp_car_car_wheels drop foreign key fk_sp_car_car_wheels_sp_car_car; +drop index ix_sp_car_car_wheels_sp_car_car on sp_car_car_wheels; -alter table o_customer drop constraint fk_o_customer_shipping_addres_2; -drop index ix_o_customer_shipping_addres_2; +alter table sp_car_car_wheels drop foreign key fk_sp_car_car_wheels_sp_car_wheel; +drop index ix_sp_car_car_wheels_sp_car_wheel on sp_car_car_wheels; -alter table eemb_inner drop constraint fk_eemb_inner_outer_id; -drop index ix_eemb_inner_outer_id; +alter table car_accessory drop foreign key fk_car_accessory_fuse_id; +drop index ix_car_accessory_fuse_id on car_accessory; -alter table einvoice drop constraint fk_einvoice_person_id; -drop index ix_einvoice_person_id; +alter table car_accessory drop foreign key fk_car_accessory_car_id; +drop index ix_car_accessory_car_id on car_accessory; -alter table enull_collection_detail drop constraint fk_enull_collection_detail_en_1; -drop index ix_enull_collection_detail_en_1; +alter table category drop foreign key fk_category_surveyobjectid; +drop index ix_category_surveyobjectid on category; -alter table eopt_one_a drop constraint fk_eopt_one_a_b_id; -drop index ix_eopt_one_a_b_id; +alter table child_person drop foreign key fk_child_person_some_bean_id; +drop index ix_child_person_some_bean_id on child_person; -alter table eopt_one_b drop constraint fk_eopt_one_b_c_id; -drop index ix_eopt_one_b_c_id; +alter table child_person drop foreign key fk_child_person_parent_identifier; +drop index ix_child_person_parent_identifier on child_person; -alter table evanilla_collection_detail drop constraint fk_evanilla_collection_detail_1; -drop index ix_evanilla_collection_detail_1; +alter table configuration drop foreign key fk_configuration_configurations_id; +drop index ix_configuration_configurations_id on configuration; -alter table td_child drop constraint fk_td_child_parent_id; -drop index ix_td_child_parent_id; +alter table contact drop foreign key fk_contact_customer_id; +drop index ix_contact_customer_id on contact; -alter table imrelated drop constraint fk_imrelated_owner_id; -drop index ix_imrelated_owner_id; +alter table contact drop foreign key fk_contact_group_id; +drop index ix_contact_group_id on contact; -alter table info_contact drop constraint fk_info_contact_company_id; -drop index ix_info_contact_company_id; +alter table contact_note drop foreign key fk_contact_note_contact_id; +drop index ix_contact_note_contact_id on contact_note; -alter table info_customer drop constraint fk_info_customer_company_id; +alter table c_conversation drop foreign key fk_c_conversation_group_id; +drop index ix_c_conversation_group_id on c_conversation; -alter table inner_report drop constraint fk_inner_report_forecast_id; +alter table o_customer drop foreign key fk_o_customer_billing_address_id; +drop index ix_o_customer_billing_address_id on o_customer; -alter table drel_invoice drop constraint fk_drel_invoice_booking; -drop index ix_drel_invoice_booking; +alter table o_customer drop foreign key fk_o_customer_shipping_address_id; +drop index ix_o_customer_shipping_address_id on o_customer; -alter table item drop constraint fk_item_type; -drop index ix_item_customer_type; +alter table dcredit_drol drop foreign key fk_dcredit_drol_dcredit; +drop index ix_dcredit_drol_dcredit on dcredit_drol; -alter table item drop constraint fk_item_region; -drop index ix_item_customer_region; +alter table dcredit_drol drop foreign key fk_dcredit_drol_drol; +drop index ix_dcredit_drol_drol on dcredit_drol; -alter table level1_level4 drop constraint fk_level1_level4_level1; -drop index ix_level1_level4_level1_id; +alter table drot_drol drop foreign key fk_drot_drol_drot; +drop index ix_drot_drol_drot on drot_drol; -alter table level1_level4 drop constraint fk_level1_level4_level4; -drop index ix_level1_level4_level4_id; +alter table drot_drol drop foreign key fk_drot_drol_drol; +drop index ix_drot_drol_drol on drot_drol; -alter table level1_level2 drop constraint fk_level1_level2_level1; -drop index ix_level1_level2_level1_id; +alter table dfk_cascade drop foreign key fk_dfk_cascade_one_id; +drop index ix_dfk_cascade_one_id on dfk_cascade; -alter table level1_level2 drop constraint fk_level1_level2_level2; -drop index ix_level1_level2_level2_id; +alter table dfk_set_null drop foreign key fk_dfk_set_null_one_id; +drop index ix_dfk_set_null_one_id on dfk_set_null; -alter table level2_level3 drop constraint fk_level2_level3_level2; -drop index ix_level2_level3_level2_id; +alter table doc drop foreign key fk_doc_id; -alter table level2_level3 drop constraint fk_level2_level3_level3; -drop index ix_level2_level3_level3_id; +alter table doc_link drop foreign key fk_doc_link_doc; +drop index ix_doc_link_doc on doc_link; -alter table la_attr_value_attribute drop constraint fk_la_attr_value_attribute_la_1; -drop index ix_la_attr_value_attribute_la_1; +alter table doc_link drop foreign key fk_doc_link_link; +drop index ix_doc_link_link on doc_link; -alter table la_attr_value_attribute drop constraint fk_la_attr_value_attribute_at_2; -drop index ix_la_attr_value_attribute_at_2; +alter table document drop foreign key fk_document_id; -alter table mprinter drop constraint fk_mprinter_current_state_id; -drop index ix_mprinter_current_state_id; +alter table document drop foreign key fk_document_organisation_id; +drop index ix_document_organisation_id on document; -alter table mprinter drop constraint fk_mprinter_last_swap_cyan_id; +alter table document_draft drop foreign key fk_document_draft_organisation_id; +drop index ix_document_draft_organisation_id on document_draft; -alter table mprinter drop constraint fk_mprinter_last_swap_magenta_3; +alter table document_media drop foreign key fk_document_media_document_id; +drop index ix_document_media_document_id on document_media; -alter table mprinter drop constraint fk_mprinter_last_swap_yellow_id; +alter table document_media_draft drop foreign key fk_document_media_draft_document_id; +drop index ix_document_media_draft_document_id on document_media_draft; -alter table mprinter drop constraint fk_mprinter_last_swap_black_id; +alter table ebasic_json_map_detail drop foreign key fk_ebasic_json_map_detail_owner_id; +drop index ix_ebasic_json_map_detail_owner_id on ebasic_json_map_detail; -alter table mprinter_state drop constraint fk_mprinter_state_printer_id; -drop index ix_mprinter_state_printer_id; +alter table ebasic_no_sdchild drop foreign key fk_ebasic_no_sdchild_owner_id; +drop index ix_ebasic_no_sdchild_owner_id on ebasic_no_sdchild; -alter table mprofile drop constraint fk_mprofile_picture_id; -drop index ix_mprofile_picture_id; +alter table ebasic_sdchild drop foreign key fk_ebasic_sdchild_owner_id; +drop index ix_ebasic_sdchild_owner_id on ebasic_sdchild; -alter table mrole_muser drop constraint fk_mrole_muser_mrole; -drop index ix_mrole_muser_mrole_roleid; +alter table eemb_inner drop foreign key fk_eemb_inner_outer_id; +drop index ix_eemb_inner_outer_id on eemb_inner; -alter table mrole_muser drop constraint fk_mrole_muser_muser; -drop index ix_mrole_muser_muser_userid; +alter table einvoice drop foreign key fk_einvoice_person_id; +drop index ix_einvoice_person_id on einvoice; -alter table muser drop constraint fk_muser_user_type_id; -drop index ix_muser_user_type_id; +alter table enull_collection_detail drop foreign key fk_enull_collection_detail_enull_collection_id; +drop index ix_enull_collection_detail_enull_collection_id on enull_collection_detail; -alter table c_message drop constraint fk_c_message_conversation_id; -drop index ix_c_message_conversation_id; +alter table eopt_one_a drop foreign key fk_eopt_one_a_b_id; +drop index ix_eopt_one_a_b_id on eopt_one_a; -alter table c_message drop constraint fk_c_message_user_id; -drop index ix_c_message_user_id; +alter table eopt_one_b drop foreign key fk_eopt_one_b_c_id; +drop index ix_eopt_one_b_c_id on eopt_one_b; -alter table mnoc_user_mnoc_role drop constraint fk_mnoc_user_mnoc_role_mnoc_u_1; -drop index ix_mnoc_user_mnoc_role_mnoc_u_1; +alter table esoft_del_book drop foreign key fk_esoft_del_book_lend_by_id; +drop index ix_esoft_del_book_lend_by_id on esoft_del_book; -alter table mnoc_user_mnoc_role drop constraint fk_mnoc_user_mnoc_role_mnoc_r_2; -drop index ix_mnoc_user_mnoc_role_mnoc_r_2; +alter table esoft_del_book_esoft_del_user drop foreign key fk_esoft_del_book_esoft_del_user_esoft_del_book; +drop index ix_esoft_del_book_esoft_del_user_esoft_del_book on esoft_del_book_esoft_del_user; -alter table mp_role drop constraint fk_mp_role_mp_user_id; -drop index ix_mp_role_mp_user_id; +alter table esoft_del_book_esoft_del_user drop foreign key fk_esoft_del_book_esoft_del_user_esoft_del_user; +drop index ix_esoft_del_book_esoft_del_user_esoft_del_user on esoft_del_book_esoft_del_user; -alter table my_lob_size_join_many drop constraint fk_my_lob_size_join_many_pare_1; -drop index ix_my_lob_size_join_many_pare_1; +alter table esoft_del_down drop foreign key fk_esoft_del_down_esoft_del_mid_id; +drop index ix_esoft_del_down_esoft_del_mid_id on esoft_del_down; -alter table o_cached_bean_country drop constraint fk_o_cached_bean_country_o_ca_1; -drop index ix_o_cached_bean_country_o_ca_1; +alter table esoft_del_mid drop foreign key fk_esoft_del_mid_top_id; +drop index ix_esoft_del_mid_top_id on esoft_del_mid; -alter table o_cached_bean_country drop constraint fk_o_cached_bean_country_o_co_2; -drop index ix_o_cached_bean_country_o_co_2; +alter table esoft_del_mid drop foreign key fk_esoft_del_mid_up_id; +drop index ix_esoft_del_mid_up_id on esoft_del_mid; -alter table o_cached_bean_child drop constraint fk_o_cached_bean_child_cached_1; -drop index ix_o_cached_bean_child_cached_1; +alter table esoft_del_one_a drop foreign key fk_esoft_del_one_a_oneb_id; -alter table oengine drop constraint fk_oengine_car_id; +alter table esoft_del_role_esoft_del_user drop foreign key fk_esoft_del_role_esoft_del_user_esoft_del_role; +drop index ix_esoft_del_role_esoft_del_user_esoft_del_role on esoft_del_role_esoft_del_user; -alter table ogear_box drop constraint fk_ogear_box_car_id; +alter table esoft_del_role_esoft_del_user drop foreign key fk_esoft_del_role_esoft_del_user_esoft_del_user; +drop index ix_esoft_del_role_esoft_del_user_esoft_del_user on esoft_del_role_esoft_del_user; -alter table o_order drop constraint fk_o_order_kcustomer_id; -drop index ix_o_order_kcustomer_id; +alter table esoft_del_user_esoft_del_role drop foreign key fk_esoft_del_user_esoft_del_role_esoft_del_user; +drop index ix_esoft_del_user_esoft_del_role_esoft_del_user on esoft_del_user_esoft_del_role; -alter table o_order_detail drop constraint fk_o_order_detail_order_id; -drop index ix_o_order_detail_order_id; +alter table esoft_del_user_esoft_del_role drop foreign key fk_esoft_del_user_esoft_del_role_esoft_del_role; +drop index ix_esoft_del_user_esoft_del_role_esoft_del_role on esoft_del_user_esoft_del_role; -alter table o_order_detail drop constraint fk_o_order_detail_product_id; -drop index ix_o_order_detail_product_id; +alter table rawinherit_uncle drop foreign key fk_rawinherit_uncle_parent_id; +drop index ix_rawinherit_uncle_parent_id on rawinherit_uncle; -alter table s_order_items drop constraint fk_s_order_items_order_uuid; -drop index ix_s_order_items_order_uuid; +alter table evanilla_collection_detail drop foreign key fk_evanilla_collection_detail_evanilla_collection_id; +drop index ix_evanilla_collection_detail_evanilla_collection_id on evanilla_collection_detail; -alter table or_order_ship drop constraint fk_or_order_ship_order_id; -drop index ix_or_order_ship_order_id; +alter table td_child drop foreign key fk_td_child_parent_id; +drop index ix_td_child_parent_id on td_child; -alter table oto_child drop constraint fk_oto_child_master_id; +alter table empl drop foreign key fk_empl_default_address_id; +drop index ix_empl_default_address_id on empl; -alter table pfile drop constraint fk_pfile_file_content_id; +alter table grand_parent_person drop foreign key fk_grand_parent_person_some_bean_id; +drop index ix_grand_parent_person_some_bean_id on grand_parent_person; -alter table pfile drop constraint fk_pfile_file_content2_id; +alter table survey_group drop foreign key fk_survey_group_categoryobjectid; +drop index ix_survey_group_categoryobjectid on survey_group; -alter table paggview drop constraint fk_paggview_pview_id; +alter table hx_link_doc drop foreign key fk_hx_link_doc_hx_link; +drop index ix_hx_link_doc_hx_link on hx_link_doc; -alter table pallet_location drop constraint fk_pallet_location_zone_sid; -drop index ix_pallet_location_zone_sid; +alter table hx_link_doc drop foreign key fk_hx_link_doc_he_doc; +drop index ix_hx_link_doc_he_doc on hx_link_doc; -alter table parcel_location drop constraint fk_parcel_location_parcelid; +alter table hi_link_doc drop foreign key fk_hi_link_doc_hi_link; +drop index ix_hi_link_doc_hi_link on hi_link_doc; -alter table rawinherit_parent_rawinherit_dat drop constraint fk_rawinherit_parent_rawinher_1; -drop index ix_rawinherit_parent_rawinher_1; +alter table hi_link_doc drop foreign key fk_hi_link_doc_hi_doc; +drop index ix_hi_link_doc_hi_doc on hi_link_doc; -alter table rawinherit_parent_rawinherit_dat drop constraint fk_rawinherit_parent_rawinher_2; -drop index ix_rawinherit_parent_rawinher_2; +alter table imrelated drop foreign key fk_imrelated_owner_id; +drop index ix_imrelated_owner_id on imrelated; -alter table c_participation drop constraint fk_c_participation_conversati_1; -drop index ix_c_participation_conversati_1; +alter table info_contact drop foreign key fk_info_contact_company_id; +drop index ix_info_contact_company_id on info_contact; -alter table c_participation drop constraint fk_c_participation_user_id; -drop index ix_c_participation_user_id; +alter table info_customer drop foreign key fk_info_customer_company_id; -alter table persistent_file_content drop constraint fk_persistent_file_content_pe_1; +alter table inner_report drop foreign key fk_inner_report_forecast_id; -alter table person drop constraint fk_person_default_address_oid; -drop index ix_person_default_address_oid; +alter table drel_invoice drop foreign key fk_drel_invoice_booking; +drop index ix_drel_invoice_booking on drel_invoice; -alter table phones drop constraint fk_phones_person_id; -drop index ix_phones_person_id; +alter table item drop foreign key fk_item_etype; +drop index ix_item_etype on item; -alter table pp_to_ww drop constraint fk_pp_to_ww_pp; -drop index ix_pp_to_ww_pp_id; +alter table item drop foreign key fk_item_eregion; +drop index ix_item_eregion on item; -alter table pp_to_ww drop constraint fk_pp_to_ww_wview; -drop index ix_pp_to_ww_ww_id; +alter table trainer_monkey drop foreign key fk_trainer_monkey_trainer; -alter table r_orders drop constraint fk_r_orders_rcustomer; -drop index ix_r_orders_company_customern_1; +alter table trainer_monkey drop foreign key fk_trainer_monkey_monkey; -alter table resourcefile drop constraint fk_resourcefile_parentresourc_1; -drop index ix_resourcefile_parentresourc_1; +alter table troop_monkey drop foreign key fk_troop_monkey_troop; -alter table mt_role drop constraint fk_mt_role_tenant_id; -drop index ix_mt_role_tenant_id; +alter table troop_monkey drop foreign key fk_troop_monkey_monkey; -alter table mt_role_permission drop constraint fk_mt_role_permission_mt_role; -drop index ix_mt_role_permission_mt_role_1; +alter table l2_cldf_reset_bean_child drop foreign key fk_l2_cldf_reset_bean_child_parent_id; +drop index ix_l2_cldf_reset_bean_child_parent_id on l2_cldf_reset_bean_child; -alter table mt_role_permission drop constraint fk_mt_role_permission_mt_perm_2; -drop index ix_mt_role_permission_mt_perm_2; +alter table level1_level4 drop foreign key fk_level1_level4_level1; +drop index ix_level1_level4_level1 on level1_level4; -alter table f_second drop constraint fk_f_second_first; +alter table level1_level4 drop foreign key fk_level1_level4_level4; +drop index ix_level1_level4_level4 on level1_level4; -alter table section drop constraint fk_section_article_id; -drop index ix_section_article_id; +alter table level1_level2 drop foreign key fk_level1_level2_level1; +drop index ix_level1_level2_level1 on level1_level2; -alter table self_parent drop constraint fk_self_parent_parent_id; -drop index ix_self_parent_parent_id; +alter table level1_level2 drop foreign key fk_level1_level2_level2; +drop index ix_level1_level2_level2 on level1_level2; -alter table self_ref_customer drop constraint fk_self_ref_customer_referred_1; -drop index ix_self_ref_customer_referred_1; +alter table level2_level3 drop foreign key fk_level2_level3_level2; +drop index ix_level2_level3_level2 on level2_level3; -alter table self_ref_example drop constraint fk_self_ref_example_parent_id; -drop index ix_self_ref_example_parent_id; +alter table level2_level3 drop foreign key fk_level2_level3_level3; +drop index ix_level2_level3_level3 on level2_level3; -alter table stockforecast drop constraint fk_stockforecast_inner_report_1; -drop index ix_stockforecast_inner_report_1; +alter table link drop foreign key fk_link_id; -alter table sub_section drop constraint fk_sub_section_section_id; -drop index ix_sub_section_section_id; +alter table la_attr_value_attribute drop foreign key fk_la_attr_value_attribute_la_attr_value; +drop index ix_la_attr_value_attribute_la_attr_value on la_attr_value_attribute; -alter table t_detail_with_other_namexxxyy drop constraint fk_t_detail_with_other_namexx_1; -drop index ix_t_detail_with_other_namexx_1; +alter table la_attr_value_attribute drop foreign key fk_la_attr_value_attribute_attribute; +drop index ix_la_attr_value_attribute_attribute on la_attr_value_attribute; -alter table ts_detail_two drop constraint fk_ts_detail_two_master_id; -drop index ix_ts_detail_two_master_id; +alter table mprinter drop foreign key fk_mprinter_current_state_id; +drop index ix_mprinter_current_state_id on mprinter; -alter table twheel drop constraint fk_twheel_owner_plate_no; -drop index ix_twheel_owner_plate_no; +alter table mprinter drop foreign key fk_mprinter_last_swap_cyan_id; -alter table tire drop constraint fk_tire_wheel; +alter table mprinter drop foreign key fk_mprinter_last_swap_magenta_id; -alter table trip drop constraint fk_trip_vehicle_driver_id; -drop index ix_trip_vehicle_driver_id; +alter table mprinter drop foreign key fk_mprinter_last_swap_yellow_id; -alter table trip drop constraint fk_trip_address_id; -drop index ix_trip_address_id; +alter table mprinter drop foreign key fk_mprinter_last_swap_black_id; -alter table type drop constraint fk_type_sub_type_id; -drop index ix_type_sub_type_id; +alter table mprinter_state drop foreign key fk_mprinter_state_printer_id; +drop index ix_mprinter_state_printer_id on mprinter_state; -alter table ut_detail drop constraint fk_ut_detail_utmaster_id; -drop index ix_ut_detail_utmaster_id; +alter table mprofile drop foreign key fk_mprofile_picture_id; +drop index ix_mprofile_picture_id on mprofile; -alter table uutwo drop constraint fk_uutwo_master_id; -drop index ix_uutwo_master_id; +alter table mrole_muser drop foreign key fk_mrole_muser_mrole; +drop index ix_mrole_muser_mrole on mrole_muser; -alter table c_user drop constraint fk_c_user_group_id; -drop index ix_c_user_group_id; +alter table mrole_muser drop foreign key fk_mrole_muser_muser; +drop index ix_mrole_muser_muser on mrole_muser; -alter table oto_user drop constraint fk_oto_user_account_id; +alter table muser drop foreign key fk_muser_user_type_id; +drop index ix_muser_user_type_id on muser; -alter table em_user_role drop constraint fk_em_user_role_user_id; -drop index ix_em_user_role_user_id; +alter table mail_user_inbox drop foreign key fk_mail_user_inbox_mail_user; +drop index ix_mail_user_inbox_mail_user on mail_user_inbox; -alter table em_user_role drop constraint fk_em_user_role_role_id; -drop index ix_em_user_role_role_id; +alter table mail_user_inbox drop foreign key fk_mail_user_inbox_mail_box; +drop index ix_mail_user_inbox_mail_box on mail_user_inbox; -alter table vehicle drop constraint fk_vehicle_truck_ref_id; -drop index ix_vehicle_truck_ref_id; +alter table mail_user_outbox drop foreign key fk_mail_user_outbox_mail_user; +drop index ix_mail_user_outbox_mail_user on mail_user_outbox; -alter table vehicle drop constraint fk_vehicle_car_ref_id; -drop index ix_vehicle_car_ref_id; +alter table mail_user_outbox drop foreign key fk_mail_user_outbox_mail_box; +drop index ix_mail_user_outbox_mail_box on mail_user_outbox; -alter table vehicle_driver drop constraint fk_vehicle_driver_vehicle_id; -drop index ix_vehicle_driver_vehicle_id; +alter table c_message drop foreign key fk_c_message_conversation_id; +drop index ix_c_message_conversation_id on c_message; -alter table vehicle_driver drop constraint fk_vehicle_driver_address_id; -drop index ix_vehicle_driver_address_id; +alter table c_message drop foreign key fk_c_message_user_id; +drop index ix_c_message_user_id on c_message; -alter table warehouses drop constraint fk_warehouses_officezoneid; -drop index ix_warehouses_officezoneid; +alter table mnoc_user_mnoc_role drop foreign key fk_mnoc_user_mnoc_role_mnoc_user; +drop index ix_mnoc_user_mnoc_role_mnoc_user on mnoc_user_mnoc_role; -alter table warehousesshippingzones drop constraint fk_warehousesshippingzones_wa_1; -drop index ix_warehousesshippingzones_wa_1; +alter table mnoc_user_mnoc_role drop foreign key fk_mnoc_user_mnoc_role_mnoc_role; +drop index ix_mnoc_user_mnoc_role_mnoc_role on mnoc_user_mnoc_role; -alter table warehousesshippingzones drop constraint fk_warehousesshippingzones_zo_2; -drop index ix_warehousesshippingzones_sh_2; +alter table mny_b drop foreign key fk_mny_b_a_id; +drop index ix_mny_b_a_id on mny_b; -alter table sa_wheel drop constraint fk_sa_wheel_tire; -drop index ix_sa_wheel_tire; +alter table mny_b_mny_c drop foreign key fk_mny_b_mny_c_mny_b; +drop index ix_mny_b_mny_c_mny_b on mny_b_mny_c; -alter table sa_wheel drop constraint fk_sa_wheel_car; -drop index ix_sa_wheel_car; +alter table mny_b_mny_c drop foreign key fk_mny_b_mny_c_mny_c; +drop index ix_mny_b_mny_c_mny_c on mny_b_mny_c; -alter table with_zero drop constraint fk_with_zero_parent_id; -drop index ix_with_zero_parent_id; +alter table subtopics drop foreign key fk_subtopics_mny_topic_1; +drop index ix_subtopics_mny_topic_1 on subtopics; + +alter table subtopics drop foreign key fk_subtopics_mny_topic_2; +drop index ix_subtopics_mny_topic_2 on subtopics; + +alter table mp_role drop foreign key fk_mp_role_mp_user_id; +drop index ix_mp_role_mp_user_id on mp_role; + +alter table ms_many_a_many_b drop foreign key fk_ms_many_a_many_b_ms_many_a; +drop index ix_ms_many_a_many_b_ms_many_a on ms_many_a_many_b; + +alter table ms_many_a_many_b drop foreign key fk_ms_many_a_many_b_ms_many_b; +drop index ix_ms_many_a_many_b_ms_many_b on ms_many_a_many_b; + +alter table ms_many_b_many_a drop foreign key fk_ms_many_b_many_a_ms_many_b; +drop index ix_ms_many_b_many_a_ms_many_b on ms_many_b_many_a; + +alter table ms_many_b_many_a drop foreign key fk_ms_many_b_many_a_ms_many_a; +drop index ix_ms_many_b_many_a_ms_many_a on ms_many_b_many_a; + +alter table my_lob_size_join_many drop foreign key fk_my_lob_size_join_many_parent_id; +drop index ix_my_lob_size_join_many_parent_id on my_lob_size_join_many; + +alter table o_cached_bean_country drop foreign key fk_o_cached_bean_country_o_cached_bean; +drop index ix_o_cached_bean_country_o_cached_bean on o_cached_bean_country; + +alter table o_cached_bean_country drop foreign key fk_o_cached_bean_country_o_country; +drop index ix_o_cached_bean_country_o_country on o_cached_bean_country; + +alter table o_cached_bean_child drop foreign key fk_o_cached_bean_child_cached_bean_id; +drop index ix_o_cached_bean_child_cached_bean_id on o_cached_bean_child; + +alter table oengine drop foreign key fk_oengine_car_id; + +alter table ogear_box drop foreign key fk_ogear_box_car_id; + +alter table oroad_show_msg drop foreign key fk_oroad_show_msg_company_id; + +alter table om_ordered_detail drop foreign key fk_om_ordered_detail_master_id; +drop index ix_om_ordered_detail_master_id on om_ordered_detail; + +alter table o_order drop foreign key fk_o_order_kcustomer_id; +drop index ix_o_order_kcustomer_id on o_order; + +alter table o_order_detail drop foreign key fk_o_order_detail_order_id; +drop index ix_o_order_detail_order_id on o_order_detail; + +alter table o_order_detail drop foreign key fk_o_order_detail_product_id; +drop index ix_o_order_detail_product_id on o_order_detail; + +alter table s_order_items drop foreign key fk_s_order_items_order_uuid; +drop index ix_s_order_items_order_uuid on s_order_items; + +alter table or_order_ship drop foreign key fk_or_order_ship_order_id; +drop index ix_or_order_ship_order_id on or_order_ship; + +alter table oto_bchild drop foreign key fk_oto_bchild_master_id; + +alter table oto_child drop foreign key fk_oto_child_master_id; + +alter table oto_cust_address drop foreign key fk_oto_cust_address_customer_cid; + +alter table oto_prime_extra drop foreign key fk_oto_prime_extra_eid; + +alter table oto_th_many drop foreign key fk_oto_th_many_oto_th_top_id; +drop index ix_oto_th_many_oto_th_top_id on oto_th_many; + +alter table oto_th_one drop foreign key fk_oto_th_one_many_id; + +alter table oto_ubprime_extra drop foreign key fk_oto_ubprime_extra_eid; + +alter table oto_uprime_extra drop foreign key fk_oto_uprime_extra_eid; + +alter table pfile drop foreign key fk_pfile_file_content_id; + +alter table pfile drop foreign key fk_pfile_file_content2_id; + +alter table paggview drop foreign key fk_paggview_pview_id; + +alter table pallet_location drop foreign key fk_pallet_location_zone_sid; +drop index ix_pallet_location_zone_sid on pallet_location; + +alter table parcel_location drop foreign key fk_parcel_location_parcelid; + +alter table rawinherit_parent_rawinherit_data drop foreign key fk_rawinherit_parent_rawinherit_data_rawinherit_parent; +drop index ix_rawinherit_parent_rawinherit_data_rawinherit_parent on rawinherit_parent_rawinherit_data; + +alter table rawinherit_parent_rawinherit_data drop foreign key fk_rawinherit_parent_rawinherit_data_rawinherit_data; +drop index ix_rawinherit_parent_rawinherit_data_rawinherit_data on rawinherit_parent_rawinherit_data; + +alter table parent_person drop foreign key fk_parent_person_some_bean_id; +drop index ix_parent_person_some_bean_id on parent_person; + +alter table parent_person drop foreign key fk_parent_person_parent_identifier; +drop index ix_parent_person_parent_identifier on parent_person; + +alter table c_participation drop foreign key fk_c_participation_conversation_id; +drop index ix_c_participation_conversation_id on c_participation; + +alter table c_participation drop foreign key fk_c_participation_user_id; +drop index ix_c_participation_user_id on c_participation; + +alter table persistent_file_content drop foreign key fk_persistent_file_content_persistent_file_id; + +alter table person drop foreign key fk_person_default_address_oid; +drop index ix_person_default_address_oid on person; + +alter table phones drop foreign key fk_phones_person_id; +drop index ix_phones_person_id on phones; + +alter table pp_to_ww drop foreign key fk_pp_to_ww_pp; +drop index ix_pp_to_ww_pp on pp_to_ww; + +alter table pp_to_ww drop foreign key fk_pp_to_ww_wview; +drop index ix_pp_to_ww_wview on pp_to_ww; + +alter table question drop foreign key fk_question_groupobjectid; +drop index ix_question_groupobjectid on question; + +alter table r_orders drop foreign key fk_r_orders_customer; +drop index ix_r_orders_customer on r_orders; + +alter table resourcefile drop foreign key fk_resourcefile_parentresourcefileid; +drop index ix_resourcefile_parentresourcefileid on resourcefile; + +alter table mt_role drop foreign key fk_mt_role_tenant_id; +drop index ix_mt_role_tenant_id on mt_role; + +alter table mt_role_permission drop foreign key fk_mt_role_permission_mt_role; +drop index ix_mt_role_permission_mt_role on mt_role_permission; + +alter table mt_role_permission drop foreign key fk_mt_role_permission_mt_permission; +drop index ix_mt_role_permission_mt_permission on mt_role_permission; + +alter table f_second drop foreign key fk_f_second_first; + +alter table section drop foreign key fk_section_article_id; +drop index ix_section_article_id on section; + +alter table self_parent drop foreign key fk_self_parent_parent_id; +drop index ix_self_parent_parent_id on self_parent; + +alter table self_ref_customer drop foreign key fk_self_ref_customer_referred_by_id; +drop index ix_self_ref_customer_referred_by_id on self_ref_customer; + +alter table self_ref_example drop foreign key fk_self_ref_example_parent_id; +drop index ix_self_ref_example_parent_id on self_ref_example; + +alter table stockforecast drop foreign key fk_stockforecast_inner_report_id; +drop index ix_stockforecast_inner_report_id on stockforecast; + +alter table sub_section drop foreign key fk_sub_section_section_id; +drop index ix_sub_section_section_id on sub_section; + +alter table tevent_many drop foreign key fk_tevent_many_event_id; +drop index ix_tevent_many_event_id on tevent_many; + +alter table tevent_one drop foreign key fk_tevent_one_event_id; + +alter table t_detail_with_other_namexxxyy drop foreign key fk_t_detail_with_other_namexxxyy_master_id; +drop index ix_t_detail_with_other_namexxxyy_master_id on t_detail_with_other_namexxxyy; + +alter table ts_detail_two drop foreign key fk_ts_detail_two_master_id; +drop index ix_ts_detail_two_master_id on ts_detail_two; + +alter table twheel drop foreign key fk_twheel_owner_plate_no; +drop index ix_twheel_owner_plate_no on twheel; + +alter table tire drop foreign key fk_tire_wheel; + +alter table trip drop foreign key fk_trip_vehicle_driver_id; +drop index ix_trip_vehicle_driver_id on trip; + +alter table trip drop foreign key fk_trip_address_id; +drop index ix_trip_address_id on trip; + +alter table type drop foreign key fk_type_sub_type_id; +drop index ix_type_sub_type_id on type; + +alter table ut_detail drop foreign key fk_ut_detail_utmaster_id; +drop index ix_ut_detail_utmaster_id on ut_detail; + +alter table uutwo drop foreign key fk_uutwo_master_id; +drop index ix_uutwo_master_id on uutwo; + +alter table c_user drop foreign key fk_c_user_group_id; +drop index ix_c_user_group_id on c_user; + +alter table oto_user drop foreign key fk_oto_user_account_id; + +alter table em_user_role drop foreign key fk_em_user_role_user_id; +drop index ix_em_user_role_user_id on em_user_role; + +alter table em_user_role drop foreign key fk_em_user_role_role_id; +drop index ix_em_user_role_role_id on em_user_role; + +alter table vehicle drop foreign key fk_vehicle_car_ref_id; +drop index ix_vehicle_car_ref_id on vehicle; + +alter table vehicle drop foreign key fk_vehicle_truck_ref_id; +drop index ix_vehicle_truck_ref_id on vehicle; + +alter table vehicle_driver drop foreign key fk_vehicle_driver_vehicle_id; +drop index ix_vehicle_driver_vehicle_id on vehicle_driver; + +alter table vehicle_driver drop foreign key fk_vehicle_driver_address_id; +drop index ix_vehicle_driver_address_id on vehicle_driver; + +alter table warehouses drop foreign key fk_warehouses_officezoneid; +drop index ix_warehouses_officezoneid on warehouses; + +alter table warehousesshippingzones drop foreign key fk_warehousesshippingzones_warehouses; +drop index ix_warehousesshippingzones_warehouses on warehousesshippingzones; + +alter table warehousesshippingzones drop foreign key fk_warehousesshippingzones_zones; +drop index ix_warehousesshippingzones_zones on warehousesshippingzones; + +alter table sa_wheel drop foreign key fk_sa_wheel_tire; +drop index ix_sa_wheel_tire on sa_wheel; + +alter table sa_wheel drop foreign key fk_sa_wheel_car; +drop index ix_sa_wheel_car on sa_wheel; + +alter table g_who_props_otm drop foreign key fk_g_who_props_otm_who_created_id; +drop index ix_g_who_props_otm_who_created_id on g_who_props_otm; + +alter table g_who_props_otm drop foreign key fk_g_who_props_otm_who_modified_id; +drop index ix_g_who_props_otm_who_modified_id on g_who_props_otm; + +alter table with_zero drop foreign key fk_with_zero_parent_id; +drop index ix_with_zero_parent_id on with_zero; drop table if exists asimple_bean; -drop sequence if exists asimple_bean_seq; drop table if exists bar; -drop sequence if exists bar_seq; drop table if exists oto_account; -drop sequence if exists oto_account_seq; -drop table if exists o_address; -drop sequence if exists o_address_seq; +drop table if exists addr; drop table if exists address; -drop sequence if exists address_seq; -drop table if exists animals; -drop sequence if exists animals_seq; +drop table if exists o_address; + +drop table if exists album; + +drop table if exists animal; drop table if exists animal_shelter; -drop sequence if exists animal_shelter_seq; drop table if exists article; -drop sequence if exists article_seq; drop table if exists attribute; -drop sequence if exists attribute_seq; drop table if exists attribute_holder; -drop sequence if exists attribute_holder_seq; drop table if exists audit_log; -drop sequence if exists audit_log_seq; drop table if exists bbookmark; -drop sequence if exists bbookmark_seq; drop table if exists bbookmark_user; -drop sequence if exists bbookmark_user_seq; drop table if exists bsimple_with_gen; -drop sequence if exists bsimple_with_gen_seq; + +drop table if exists bsite; + +drop table if exists bsite_user; + +drop table if exists bsite_user_b; + +drop table if exists bsite_user_c; + +drop table if exists buser; drop table if exists bwith_qident; -drop sequence if exists bwith_qident_seq; drop table if exists basic_joda_entity; -drop sequence if exists basic_joda_entity_seq; drop table if exists bean_with_time_zone; -drop sequence if exists bean_with_time_zone_seq; drop table if exists drel_booking; -drop sequence if exists drel_booking_seq; + +drop table if exists cinh_root; drop table if exists ckey_assoc; -drop sequence if exists ckey_assoc_seq; drop table if exists ckey_detail; -drop sequence if exists ckey_detail_seq; drop table if exists ckey_parent; drop table if exists calculation_result; -drop sequence if exists calculation_result_seq; drop table if exists cao_bean; drop table if exists sa_car; -drop sequence if exists sa_car_seq; drop table if exists sp_car_car; -drop sequence if exists sp_car_car_seq; drop table if exists sp_car_car_wheels; drop table if exists car_accessory; -drop sequence if exists car_accessory_seq; + +drop table if exists car_fuse; + +drop table if exists category; + +drop table if exists child_person; drop table if exists configuration; -drop sequence if exists configuration_seq; drop table if exists configurations; -drop sequence if exists configurations_seq; drop table if exists contact; -drop sequence if exists contact_seq; drop table if exists contact_group; -drop sequence if exists contact_group_seq; drop table if exists contact_note; -drop sequence if exists contact_note_seq; drop table if exists c_conversation; -drop sequence if exists c_conversation_seq; drop table if exists o_country; +drop table if exists cover; + drop table if exists o_customer; -drop sequence if exists o_customer_seq; + +drop table if exists dcredit; + +drop table if exists dcredit_drol; drop table if exists dexh_entity; -drop sequence if exists dexh_entity_seq; drop table if exists dperson; -drop sequence if exists dperson_seq; + +drop table if exists drol; + +drop table if exists drot; + +drop table if exists drot_drol; drop table if exists rawinherit_data; -drop sequence if exists rawinherit_data_seq; + +drop table if exists dfk_cascade; + +drop table if exists dfk_cascade_one; + +drop table if exists dfk_none; + +drop table if exists dfk_none_via_join; + +drop table if exists dfk_one; + +drop table if exists dfk_set_null; + +drop table if exists doc; + +drop table if exists doc_link; + +drop table if exists doc_link_draft; + +drop table if exists doc_draft; + +drop table if exists document; + +drop table if exists document_draft; + +drop table if exists document_media; + +drop table if exists document_media_draft; + +drop table if exists earray_bean; + +drop table if exists earray_set_bean; drop table if exists e_basic; -drop sequence if exists e_basic_seq; + +drop table if exists ebasic_change_log; drop table if exists ebasic_clob; -drop sequence if exists ebasic_clob_seq; drop table if exists ebasic_clob_fetch_eager; -drop sequence if exists ebasic_clob_fetch_eager_seq; drop table if exists ebasic_clob_no_ver; -drop sequence if exists ebasic_clob_no_ver_seq; drop table if exists e_basicenc; -drop sequence if exists e_basicenc_seq; drop table if exists e_basicenc_bin; -drop sequence if exists e_basicenc_bin_seq; drop table if exists e_basic_enum_id; +drop table if exists e_basic_eni; + +drop table if exists ebasic_hstore; + +drop table if exists ebasic_json_list; + drop table if exists ebasic_json_map; -drop sequence if exists ebasic_json_map_seq; drop table if exists ebasic_json_map_blob; -drop sequence if exists ebasic_json_map_blob_seq; drop table if exists ebasic_json_map_clob; -drop sequence if exists ebasic_json_map_clob_seq; + +drop table if exists ebasic_json_map_detail; drop table if exists ebasic_json_map_json_b; -drop sequence if exists ebasic_json_map_json_b_seq; drop table if exists ebasic_json_map_varchar; -drop sequence if exists ebasic_json_map_varchar_seq; drop table if exists ebasic_json_node; -drop sequence if exists ebasic_json_node_seq; drop table if exists ebasic_json_node_blob; -drop sequence if exists ebasic_json_node_blob_seq; drop table if exists ebasic_json_node_json_b; -drop sequence if exists ebasic_json_node_json_b_seq; drop table if exists ebasic_json_node_varchar; -drop sequence if exists ebasic_json_node_varchar_seq; + +drop table if exists ebasic_json_unmapped; drop table if exists e_basic_ndc; -drop sequence if exists e_basic_ndc_seq; + +drop table if exists ebasic_no_sdchild; + +drop table if exists ebasic_sdchild; + +drop table if exists ebasic_soft_delete; drop table if exists e_basicver; -drop sequence if exists e_basicver_seq; drop table if exists e_basic_withlife; -drop sequence if exists e_basic_withlife_seq; drop table if exists e_basicverucon; -drop sequence if exists e_basicverucon_seq; + +drop table if exists e_col_ab; + +drop table if exists ecustom_id; drop table if exists eemb_inner; -drop sequence if exists eemb_inner_seq; drop table if exists eemb_outer; -drop sequence if exists eemb_outer_seq; drop table if exists egen_props; -drop sequence if exists egen_props_seq; drop table if exists einvoice; -drop sequence if exists einvoice_seq; drop table if exists e_main; -drop sequence if exists e_main_seq; drop table if exists enull_collection; -drop sequence if exists enull_collection_seq; drop table if exists enull_collection_detail; -drop sequence if exists enull_collection_detail_seq; drop table if exists eopt_one_a; -drop sequence if exists eopt_one_a_seq; drop table if exists eopt_one_b; -drop sequence if exists eopt_one_b_seq; drop table if exists eopt_one_c; -drop sequence if exists eopt_one_c_seq; drop table if exists eperson; -drop sequence if exists eperson_seq; + +drop table if exists e_person_online; drop table if exists esimple; +drop table if exists esoft_del_book; + +drop table if exists esoft_del_book_esoft_del_user; + +drop table if exists esoft_del_down; + +drop table if exists esoft_del_mid; + +drop table if exists esoft_del_one_a; + +drop table if exists esoft_del_one_b; + +drop table if exists esoft_del_role; + +drop table if exists esoft_del_role_esoft_del_user; + +drop table if exists esoft_del_top; + +drop table if exists esoft_del_up; + +drop table if exists esoft_del_user; + +drop table if exists esoft_del_user_esoft_del_role; + +drop table if exists esome_convert_type; + drop table if exists esome_type; -drop sequence if exists esome_type_seq; drop table if exists etrans_many; -drop sequence if exists etrans_many_seq; + +drop table if exists rawinherit_uncle; drop table if exists evanilla_collection; -drop sequence if exists evanilla_collection_seq; drop table if exists evanilla_collection_detail; -drop sequence if exists evanilla_collection_detail_seq; drop table if exists ewho_props; -drop sequence if exists ewho_props_seq; drop table if exists e_withinet; -drop sequence if exists e_withinet_seq; drop table if exists td_child; -drop sequence if exists td_child_seq; drop table if exists td_parent; -drop sequence if exists td_parent_seq; + +drop table if exists empl; drop table if exists feature_desc; -drop sequence if exists feature_desc_seq; drop table if exists f_first; -drop sequence if exists f_first_seq; drop table if exists foo; -drop sequence if exists foo_seq; drop table if exists gen_key_identity; drop table if exists gen_key_sequence; -drop sequence if exists seq; drop table if exists gen_key_table; -drop sequence if exists gen_key_table_seq; + +drop table if exists grand_parent_person; + +drop table if exists survey_group; drop table if exists c_group; -drop sequence if exists c_group_seq; + +drop table if exists he_doc; + +drop trigger hx_link_history_upd; +drop trigger hx_link_history_del; +drop view hx_link_with_history; +alter table hx_link drop column sys_period_start; +alter table hx_link drop column sys_period_end; +drop table hx_link_history; + +drop table if exists hx_link; + +drop table if exists hx_link_doc; + +drop table if exists hi_doc; + +drop trigger hi_link_history_upd; +drop trigger hi_link_history_del; +drop view hi_link_with_history; +alter table hi_link drop column sys_period_start; +alter table hi_link drop column sys_period_end; +drop table hi_link_history; + +drop table if exists hi_link; + +drop trigger hi_link_doc_history_upd; +drop trigger hi_link_doc_history_del; +drop view hi_link_doc_with_history; +alter table hi_link_doc drop column sys_period_start; +alter table hi_link_doc drop column sys_period_end; +drop table hi_link_doc_history; + +drop table if exists hi_link_doc; drop table if exists imrelated; -drop sequence if exists imrelated_seq; drop table if exists imroot; -drop sequence if exists imroot_seq; drop table if exists ixresource; drop table if exists info_company; -drop sequence if exists info_company_seq; drop table if exists info_contact; -drop sequence if exists info_contact_seq; drop table if exists info_customer; -drop sequence if exists info_customer_seq; drop table if exists inner_report; -drop sequence if exists inner_report_seq; drop table if exists drel_invoice; -drop sequence if exists drel_invoice_seq; drop table if exists item; +drop table if exists monkey; + +drop table if exists trainer; + +drop table if exists trainer_monkey; + +drop table if exists troop; + +drop table if exists troop_monkey; + +drop table if exists l2_cldf_reset_bean; + +drop table if exists l2_cldf_reset_bean_child; + drop table if exists level1; -drop sequence if exists level1_seq; drop table if exists level1_level4; drop table if exists level1_level2; drop table if exists level2; -drop sequence if exists level2_seq; drop table if exists level2_level3; drop table if exists level3; -drop sequence if exists level3_seq; drop table if exists level4; -drop sequence if exists level4_seq; + +drop trigger link_history_upd; +drop trigger link_history_del; +drop view link_with_history; +alter table link drop column sys_period_start; +alter table link drop column sys_period_end; +drop table link_history; + +drop table if exists link; + +drop table if exists link_draft; drop table if exists la_attr_value; -drop sequence if exists la_attr_value_seq; drop table if exists la_attr_value_attribute; drop table if exists mmedia; -drop sequence if exists mmedia_seq; drop table if exists non_updateprop; -drop sequence if exists non_updateprop_seq; drop table if exists mprinter; -drop sequence if exists mprinter_seq; drop table if exists mprinter_state; -drop sequence if exists mprinter_state_seq; drop table if exists mprofile; -drop sequence if exists mprofile_seq; drop table if exists mprotected_construct_bean; -drop sequence if exists mprotected_construct_bean_seq; drop table if exists mrole; -drop sequence if exists mrole_seq; drop table if exists mrole_muser; drop table if exists msome_other; -drop sequence if exists msome_other_seq; drop table if exists muser; -drop sequence if exists muser_seq; drop table if exists muser_type; -drop sequence if exists muser_type_seq; + +drop table if exists mail_box; + +drop table if exists mail_user; + +drop table if exists mail_user_inbox; + +drop table if exists mail_user_outbox; drop table if exists map_super_actual; -drop sequence if exists map_super_actual_seq; drop table if exists c_message; -drop sequence if exists c_message_seq; drop table if exists mnoc_role; -drop sequence if exists mnoc_role_seq; drop table if exists mnoc_user; -drop sequence if exists mnoc_user_seq; drop table if exists mnoc_user_mnoc_role; +drop table if exists mny_a; + +drop table if exists mny_b; + +drop table if exists mny_b_mny_c; + +drop table if exists mny_c; + +drop table if exists mny_topic; + +drop table if exists subtopics; + drop table if exists mp_role; -drop sequence if exists mp_role_seq; drop table if exists mp_user; -drop sequence if exists mp_user_seq; + +drop table if exists ms_many_a; + +drop table if exists ms_many_a_many_b; + +drop table if exists ms_many_b; + +drop table if exists ms_many_b_many_a; drop table if exists my_lob_size; -drop sequence if exists my_lob_size_seq; drop table if exists my_lob_size_join_many; -drop sequence if exists my_lob_size_join_many_seq; drop table if exists noidbean; drop table if exists o_cached_bean; -drop sequence if exists o_cached_bean_seq; drop table if exists o_cached_bean_country; drop table if exists o_cached_bean_child; -drop sequence if exists o_cached_bean_child_seq; + +drop table if exists o_cached_natkey; + +drop table if exists o_cached_natkey3; drop table if exists ocar; -drop sequence if exists ocar_seq; + +drop table if exists ocompany; drop table if exists oengine; drop table if exists ogear_box; +drop table if exists oroad_show_msg; + +drop table if exists om_ordered_detail; + +drop table if exists om_ordered_master; + drop table if exists o_order; -drop sequence if exists o_order_seq; drop table if exists o_order_detail; -drop sequence if exists o_order_detail_seq; drop table if exists s_orders; drop table if exists s_order_items; drop table if exists or_order_ship; -drop sequence if exists or_order_ship_seq; + +drop table if exists organisation; + +drop table if exists oto_bchild; + +drop table if exists oto_bmaster; drop table if exists oto_child; -drop sequence if exists oto_child_seq; + +drop table if exists oto_cust; + +drop table if exists oto_cust_address; drop table if exists oto_master; -drop sequence if exists oto_master_seq; + +drop table if exists oto_prime; + +drop table if exists oto_prime_extra; + +drop table if exists oto_th_many; + +drop table if exists oto_th_one; + +drop table if exists oto_th_top; + +drop table if exists oto_ubprime; + +drop table if exists oto_ubprime_extra; + +drop table if exists oto_uprime; + +drop table if exists oto_uprime_extra; drop table if exists pfile; -drop sequence if exists pfile_seq; drop table if exists pfile_content; -drop sequence if exists pfile_content_seq; drop table if exists paggview; drop table if exists pallet_location; -drop sequence if exists pallet_location_seq; drop table if exists parcel; -drop sequence if exists parcel_seq; drop table if exists parcel_location; -drop sequence if exists parcel_location_seq; drop table if exists rawinherit_parent; -drop sequence if exists rawinherit_parent_seq; -drop table if exists rawinherit_parent_rawinherit_dat; +drop table if exists rawinherit_parent_rawinherit_data; + +drop table if exists parent_person; drop table if exists c_participation; -drop sequence if exists c_participation_seq; drop table if exists mt_permission; drop table if exists persistent_file; -drop sequence if exists persistent_file_seq; drop table if exists persistent_file_content; -drop sequence if exists persistent_file_content_seq; drop table if exists persons; -drop sequence if exists persons_seq; drop table if exists person; -drop sequence if exists person_seq; drop table if exists phones; -drop sequence if exists phones_seq; + +drop table if exists primary_revision; drop table if exists o_product; -drop sequence if exists o_product_seq; drop table if exists pp; drop table if exists pp_to_ww; +drop table if exists question; + drop table if exists rcustomer; drop table if exists r_orders; @@ -783,154 +1143,136 @@ drop table if exists region; drop table if exists resourcefile; +drop table if exists em_role; + drop table if exists mt_role; drop table if exists mt_role_permission; -drop table if exists em_role; -drop sequence if exists em_role_seq; - drop table if exists f_second; -drop sequence if exists f_second_seq; drop table if exists section; -drop sequence if exists section_seq; drop table if exists self_parent; -drop sequence if exists self_parent_seq; drop table if exists self_ref_customer; -drop sequence if exists self_ref_customer_seq; drop table if exists self_ref_example; -drop sequence if exists self_ref_example_seq; drop table if exists some_enum_bean; -drop sequence if exists some_enum_bean_seq; drop table if exists some_file_bean; -drop sequence if exists some_file_bean_seq; drop table if exists some_new_types_bean; -drop sequence if exists some_new_types_bean_seq; drop table if exists some_period_bean; -drop sequence if exists some_period_bean_seq; drop table if exists stockforecast; -drop sequence if exists stockforecast_seq; drop table if exists sub_section; -drop sequence if exists sub_section_seq; drop table if exists sub_type; -drop sequence if exists sub_type_seq; + +drop table if exists survey; drop table if exists tbytes_only; -drop sequence if exists tbytes_only_seq; drop table if exists tcar; +drop table if exists tevent; + +drop table if exists tevent_many; + +drop table if exists tevent_one; + drop table if exists tint_root; -drop sequence if exists tint_root_seq; drop table if exists tjoda_entity; -drop sequence if exists tjoda_entity_seq; drop table if exists t_mapsuper1; -drop sequence if exists t_mapsuper1_seq; drop table if exists t_oneb; -drop sequence if exists t_oneb_seq; drop table if exists t_detail_with_other_namexxxyy; -drop sequence if exists t_atable_detail_seq; drop table if exists ts_detail_two; -drop sequence if exists ts_detail_two_seq; drop table if exists t_atable_thatisrelatively; -drop sequence if exists t_atable_master_seq; drop table if exists ts_master_two; -drop sequence if exists ts_master_two_seq; drop table if exists tuuid_entity; drop table if exists twheel; -drop sequence if exists twheel_seq; drop table if exists twith_pre_insert; -drop sequence if exists twith_pre_insert_seq; drop table if exists mt_tenant; -drop table if exists sa_tire; -drop sequence if exists sa_tire_seq; +drop table if exists test_annotation_base_entity; drop table if exists tire; -drop sequence if exists tire_seq; + +drop table if exists sa_tire; drop table if exists trip; -drop sequence if exists trip_seq; drop table if exists truck_ref; -drop sequence if exists truck_ref_seq; drop table if exists type; +drop table if exists tz_bean; + drop table if exists ut_detail; -drop sequence if exists ut_detail_seq; drop table if exists ut_master; -drop sequence if exists ut_master_seq; drop table if exists uuone; drop table if exists uutwo; -drop table if exists em_user; -drop sequence if exists em_user_seq; - -drop table if exists tx_user; -drop sequence if exists tx_user_seq; +drop trigger c_user_history_upd; +drop trigger c_user_history_del; +drop view c_user_with_history; +alter table c_user drop column sys_period_start; +alter table c_user drop column sys_period_end; +drop table c_user_history; drop table if exists c_user; -drop sequence if exists c_user_seq; + +drop table if exists tx_user; + +drop table if exists g_user; + +drop table if exists em_user; drop table if exists oto_user; -drop sequence if exists oto_user_seq; drop table if exists em_user_role; drop table if exists vehicle; -drop sequence if exists vehicle_seq; drop table if exists vehicle_driver; -drop sequence if exists vehicle_driver_seq; drop table if exists warehouses; -drop sequence if exists warehouses_seq; drop table if exists warehousesshippingzones; drop table if exists sa_wheel; -drop sequence if exists sa_wheel_seq; - -drop table if exists sp_car_wheel; -drop sequence if exists sp_car_wheel_seq; drop table if exists wheel; -drop sequence if exists wheel_seq; + +drop table if exists sp_car_wheel; + +drop table if exists g_who_props_otm; drop table if exists with_zero; -drop sequence if exists with_zero_seq; drop table if exists parent; -drop sequence if exists parent_seq; drop table if exists wview; drop table if exists zones; -drop sequence if exists zones_seq; +drop index ix_contact_last_name_first_name on contact; +drop index ix_e_basic_name on e_basic; diff --git a/src/test/ddl-review/mysql-create-all.sql b/src/test/ddl-review/mysql-create-all.sql index 974b5461d..67fd4e368 100644 --- a/src/test/ddl-review/mysql-create-all.sql +++ b/src/test/ddl-review/mysql-create-all.sql @@ -1,3 +1,4 @@ +-- Generated by ebean unknown at 2018-03-08T06:38:18.344Z create table asimple_bean ( id bigint auto_increment not null, name varchar(255), @@ -21,6 +22,24 @@ create table oto_account ( constraint pk_oto_account primary key (id) ); +create table addr ( + id bigint auto_increment not null, + employee_id bigint, + name varchar(255), + address_line1 varchar(255), + address_line2 varchar(255), + city varchar(255), + version bigint not null, + constraint pk_addr primary key (id) +); + +create table address ( + oid bigint auto_increment not null, + street varchar(255), + version integer not null, + constraint pk_address primary key (oid) +); + create table o_address ( id smallint auto_increment not null, line_1 varchar(100), @@ -32,22 +51,27 @@ create table o_address ( constraint pk_o_address primary key (id) ); -create table address ( - oid bigint auto_increment not null, - street varchar(255), - version integer not null, - constraint pk_address primary key (oid) +create table album ( + id bigint auto_increment not null, + name varchar(255), + cover_id bigint, + deleted tinyint(1) default 0 not null, + created_at datetime(6) not null, + last_update datetime(6) not null, + constraint uq_album_cover_id unique (cover_id), + constraint pk_album primary key (id) ); -create table animals ( - species varchar(31) not null, +create table animal ( + species varchar(255) not null, id bigint auto_increment not null, shelter_id bigint, version bigint not null, name varchar(255), registration_number varchar(255), date_of_birth date, - constraint pk_animals primary key (id) + dog_size varchar(255), + constraint pk_animal primary key (id) ); create table animal_shelter ( @@ -114,9 +138,45 @@ create table bsimple_with_gen ( constraint pk_bsimple_with_gen primary key (id) ); +create table bsite ( + id varchar(40) not null, + name varchar(255), + constraint pk_bsite primary key (id) +); + +create table bsite_user ( + site_id varchar(40) not null, + user_id varchar(40) not null, + access_level integer, + constraint ck_bsite_user_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user primary key (site_id,user_id) +); + +create table bsite_user_b ( + site varchar(40) not null, + usr varchar(40) not null, + access_level integer, + constraint ck_bsite_user_b_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_b primary key (site,usr) +); + +create table bsite_user_c ( + site_uid varchar(40) not null, + user_uid varchar(40) not null, + access_level integer, + constraint ck_bsite_user_c_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_c primary key (site_uid,user_uid) +); + +create table buser ( + id varchar(40) not null, + name varchar(255), + constraint pk_buser primary key (id) +); + create table bwith_qident ( id integer auto_increment not null, - `Name` varchar(255), + `Name` varchar(191), last_updated datetime(6) not null, constraint uq_bwith_qident_name unique (`Name`), constraint pk_bwith_qident primary key (id) @@ -125,6 +185,7 @@ create table bwith_qident ( create table basic_joda_entity ( id bigint auto_increment not null, name varchar(255), + period varchar(50), created datetime(6) not null, updated datetime(6) not null, version datetime(6) not null, @@ -140,14 +201,29 @@ create table bean_with_time_zone ( create table drel_booking ( id bigint auto_increment not null, + booking_uid bigint, agent_invoice bigint, client_invoice bigint, version integer not null, + constraint uq_drel_booking_booking_uid unique (booking_uid), constraint uq_drel_booking_agent_invoice unique (agent_invoice), constraint uq_drel_booking_client_invoice unique (client_invoice), constraint pk_drel_booking primary key (id) ); +create table cinh_root ( + dtype varchar(3) not null, + id integer auto_increment not null, + license_number varchar(255), + cretime datetime(6) not null, + updtime datetime(6) not null, + version bigint not null, + driver varchar(255), + notes varchar(255), + action varchar(255), + constraint pk_cinh_root primary key (id) +); + create table ckey_assoc ( id integer auto_increment not null, assoc_one varchar(255), @@ -173,7 +249,7 @@ create table ckey_parent ( create table calculation_result ( id integer auto_increment not null, - charge double, + charge double not null, product_configuration_id integer, group_configuration_id integer, constraint pk_calculation_result primary key (id) @@ -208,6 +284,7 @@ create table sp_car_car_wheels ( create table car_accessory ( id integer auto_increment not null, name varchar(255), + fuse_id bigint not null, car_id integer, cretime datetime(6) not null, updtime datetime(6) not null, @@ -215,8 +292,33 @@ create table car_accessory ( constraint pk_car_accessory primary key (id) ); +create table car_fuse ( + id bigint auto_increment not null, + location_code varchar(255), + constraint pk_car_fuse primary key (id) +); + +create table category ( + id bigint auto_increment not null, + name varchar(255), + surveyobjectid bigint, + sequence_number integer not null, + constraint pk_category primary key (id) +); + +create table child_person ( + identifier integer auto_increment not null, + name varchar(255), + age integer, + some_bean_id integer, + parent_identifier integer, + family_name varchar(255), + address varchar(255), + constraint pk_child_person primary key (identifier) +); + create table configuration ( - type varchar(31) not null, + type varchar(21) not null, id integer auto_increment not null, name varchar(255), configurations_id integer, @@ -233,8 +335,8 @@ create table configurations ( create table contact ( id integer auto_increment not null, - first_name varchar(255), - last_name varchar(255), + first_name varchar(127), + last_name varchar(127), phone varchar(255), mobile varchar(255), email varchar(255), @@ -268,7 +370,7 @@ create table contact_note ( create table c_conversation ( id bigint auto_increment not null, title varchar(255), - isopen tinyint(1) default 0, + isopen tinyint(1) default 0 not null, group_id bigint, version bigint not null, when_created datetime(6) not null, @@ -282,26 +384,44 @@ create table o_country ( constraint pk_o_country primary key (code) ); +create table cover ( + id bigint auto_increment not null, + s3url varchar(255), + deleted tinyint(1) default 0 not null, + constraint pk_cover primary key (id) +); + create table o_customer ( id integer auto_increment not null, - status varchar(1), + status varchar(1) comment 'status of the customer', name varchar(40) not null, - smallnote varchar(100), - anniversary date, + smallnote varchar(100) comment 'Short notes regarding the customer', + anniversary date comment 'Join date of the customer', billing_address_id smallint, shipping_address_id smallint, cretime datetime(6) not null, updtime datetime(6) not null, version bigint not null, - constraint ck_o_customer_status check (status in ('N','A','I')), + constraint ck_o_customer_status check ( status in ('N','A','I')), constraint pk_o_customer primary key (id) +) comment='Holds external customers'; + +create table dcredit ( + id bigint auto_increment not null, + credit varchar(255), + constraint pk_dcredit primary key (id) +); + +create table dcredit_drol ( + dcredit_id bigint not null, + drol_id bigint not null, + constraint pk_dcredit_drol primary key (dcredit_id,drol_id) ); create table dexh_entity ( oid bigint auto_increment not null, - exhange_rate decimal(38), - exhange_cmoney_amount decimal(38), - exhange_cmoney_currency varchar(3), + exhange varchar(255), + an_enum_type varchar(255), last_updated datetime(6) not null, constraint pk_dexh_entity primary key (oid) ); @@ -311,29 +431,197 @@ create table dperson ( first_name varchar(255), last_name varchar(255), salary decimal(38), - a_amt decimal(38), - a_curr varchar(3), - i_start datetime(6), - i_end datetime(6), constraint pk_dperson primary key (id) ); +create table drol ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_drol primary key (id) +); + +create table drot ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_drot primary key (id) +); + +create table drot_drol ( + drot_id bigint not null, + drol_id bigint not null, + constraint pk_drot_drol primary key (drot_id,drol_id) +); + create table rawinherit_data ( id bigint auto_increment not null, val integer, constraint pk_rawinherit_data primary key (id) ); +create table dfk_cascade ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_cascade primary key (id) +); + +create table dfk_cascade_one ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_dfk_cascade_one primary key (id) +); + +create table dfk_none ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_none primary key (id) +); + +create table dfk_none_via_join ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_none_via_join primary key (id) +); + +create table dfk_one ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_dfk_one primary key (id) +); + +create table dfk_set_null ( + id bigint auto_increment not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_set_null primary key (id) +); + +create table doc ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_doc primary key (id) +); + +create table doc_link ( + doc_id bigint not null, + link_id bigint not null, + constraint pk_doc_link primary key (doc_id,link_id) +); + +create table doc_link_draft ( + doc_id bigint not null, + link_id bigint not null, + constraint pk_doc_link_draft primary key (doc_id,link_id) +); + +create table doc_draft ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_doc_draft primary key (id) +); + +create table document ( + id bigint auto_increment not null, + title varchar(127), + body varchar(255), + organisation_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint uq_document_title unique (title), + constraint pk_document primary key (id) +); + +create table document_draft ( + id bigint auto_increment not null, + title varchar(127), + body varchar(255), + when_publish datetime(6), + organisation_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint uq_document_draft_title unique (title), + constraint pk_document_draft primary key (id) +); + +create table document_media ( + id bigint auto_increment not null, + document_id bigint, + name varchar(255), + description varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_document_media primary key (id) +); + +create table document_media_draft ( + id bigint auto_increment not null, + document_id bigint, + name varchar(255), + description varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_document_media_draft primary key (id) +); + +create table earray_bean ( + id bigint auto_increment not null, + name varchar(255), + phone_numbers varchar(300), + uids varchar(1000), + other_ids varchar(1000), + doubs varchar(1000), + statuses varchar(1000), + status2 varchar(1000), + version bigint not null, + constraint pk_earray_bean primary key (id) +); + +create table earray_set_bean ( + id bigint auto_increment not null, + name varchar(255), + phone_numbers varchar(300), + uids varchar(1000), + other_ids varchar(1000), + doubs varchar(1000), + version bigint not null, + constraint pk_earray_set_bean primary key (id) +); + create table e_basic ( id integer auto_increment not null, status varchar(1), - name varchar(255), + name varchar(127), description varchar(255), some_date datetime(6), - constraint ck_e_basic_status check (status in ('N','A','I')), + constraint ck_e_basic_status check ( status in ('N','A','I')), constraint pk_e_basic primary key (id) ); +create table ebasic_change_log ( + id bigint auto_increment not null, + name varchar(20), + short_description varchar(50), + long_description varchar(100), + who_created varchar(255) not null, + who_modified varchar(255) not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + version bigint not null, + constraint pk_ebasic_change_log primary key (id) +); + create table ebasic_clob ( id bigint auto_increment not null, name varchar(255), @@ -364,6 +652,7 @@ create table e_basicenc ( name varchar(255), description varbinary(80), dob varbinary(20), + status varbinary(20), last_update datetime(6), constraint pk_e_basicenc primary key (id) ); @@ -382,10 +671,41 @@ create table e_basic_enum_id ( status varchar(1) not null, name varchar(255), description varchar(255), - constraint ck_e_basic_enum_id_status check (status in ('N','A','I')), + constraint ck_e_basic_enum_id_status check ( status in ('N','A','I')), constraint pk_e_basic_enum_id primary key (status) ); +create table e_basic_eni ( + id integer auto_increment not null, + status integer, + name varchar(255), + description varchar(255), + some_date datetime(6), + constraint ck_e_basic_eni_status check ( status in (1,2,3)), + constraint pk_e_basic_eni primary key (id) +); + +create table ebasic_hstore ( + id bigint auto_increment not null, + name varchar(255), + map varchar(800), + version bigint not null, + constraint pk_ebasic_hstore primary key (id) +); + +create table ebasic_json_list ( + id bigint auto_increment not null, + name varchar(255), + bean_set varchar(700), + bean_list longtext, + bean_map varchar(700), + plain_bean varchar(500), + flags varchar(50), + tags varchar(100), + version bigint not null, + constraint pk_ebasic_json_list primary key (id) +); + create table ebasic_json_map ( id bigint auto_increment not null, name varchar(255), @@ -410,6 +730,15 @@ create table ebasic_json_map_clob ( constraint pk_ebasic_json_map_clob primary key (id) ); +create table ebasic_json_map_detail ( + id bigint auto_increment not null, + owner_id bigint, + name varchar(255), + content longtext, + version bigint not null, + constraint pk_ebasic_json_map_detail primary key (id) +); + create table ebasic_json_map_json_b ( id bigint auto_increment not null, name varchar(255), @@ -458,12 +787,47 @@ create table ebasic_json_node_varchar ( constraint pk_ebasic_json_node_varchar primary key (id) ); +create table ebasic_json_unmapped ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_ebasic_json_unmapped primary key (id) +); + create table e_basic_ndc ( id integer auto_increment not null, name varchar(255), constraint pk_e_basic_ndc primary key (id) ); +create table ebasic_no_sdchild ( + id bigint auto_increment not null, + owner_id bigint not null, + child_name varchar(255), + amount bigint not null, + version bigint not null, + constraint pk_ebasic_no_sdchild primary key (id) +); + +create table ebasic_sdchild ( + id bigint auto_increment not null, + owner_id bigint not null, + child_name varchar(255), + amount bigint not null, + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_ebasic_sdchild primary key (id) +); + +create table ebasic_soft_delete ( + id bigint auto_increment not null, + name varchar(255), + description varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_ebasic_soft_delete primary key (id) +); + create table e_basicver ( id integer auto_increment not null, name varchar(255), @@ -476,21 +840,36 @@ create table e_basicver ( create table e_basic_withlife ( id bigint auto_increment not null, name varchar(255), + deleted tinyint(1) default 0 not null, version bigint not null, constraint pk_e_basic_withlife primary key (id) ); create table e_basicverucon ( id integer auto_increment not null, - name varchar(255), - other varchar(255), - other_one varchar(255), + name varchar(127), + other varchar(127), + other_one varchar(127), description varchar(255), last_update datetime(6) not null, constraint uq_e_basicverucon_name unique (name), + constraint uq_e_basicverucon_other_other_one unique (other,other_one), constraint pk_e_basicverucon primary key (id) ); +create table e_col_ab ( + id bigint auto_increment not null, + column_a varchar(255), + column_b varchar(255), + constraint pk_e_col_ab primary key (id) +); + +create table ecustom_id ( + id varchar(127) not null, + name varchar(255), + constraint pk_ecustom_id primary key (id) +); + create table eemb_inner ( id integer auto_increment not null, nome_inner varchar(255), @@ -522,6 +901,8 @@ create table egen_props ( odt_updated datetime(6) not null, zdt_created datetime(6) not null, zdt_updated datetime(6) not null, + instant_created datetime(6) not null, + instant_updated datetime(6) not null, long_created bigint not null, long_updated bigint not null, constraint pk_egen_props primary key (id) @@ -535,11 +916,15 @@ create table einvoice ( ship_street varchar(255), ship_suburb varchar(255), ship_city varchar(255), - street varchar(255), - suburb varchar(255), - city varchar(255), + ship_status varchar(3), + bill_street varchar(255), + bill_suburb varchar(255), + bill_city varchar(255), + bill_status varchar(3), version bigint not null, - constraint ck_einvoice_state check (state in (0,1,2)), + constraint ck_einvoice_state check ( state in (0,1,2)), + constraint ck_einvoice_ship_status check ( ship_status in ('ONE','TWO')), + constraint ck_einvoice_bill_status check ( bill_status in ('ONE','TWO')), constraint pk_einvoice primary key (id) ); @@ -599,17 +984,130 @@ create table eperson ( notes varchar(255), street varchar(255), suburb varchar(255), - city varchar(255), + addr_city varchar(255), + addr_status varchar(3), version bigint not null, + constraint ck_eperson_addr_status check ( addr_status in ('ONE','TWO')), constraint pk_eperson primary key (id) ); +create table e_person_online ( + id bigint auto_increment not null, + email varchar(127), + online_status tinyint(1) default 0 not null, + when_updated datetime(6) not null, + constraint uq_e_person_online_email unique (email), + constraint pk_e_person_online primary key (id) +); + create table esimple ( usertypeid integer auto_increment not null, name varchar(255), constraint pk_esimple primary key (usertypeid) ); +create table esoft_del_book ( + id bigint auto_increment not null, + book_title varchar(255), + lend_by_id bigint, + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_book primary key (id) +); + +create table esoft_del_book_esoft_del_user ( + esoft_del_book_id bigint not null, + esoft_del_user_id bigint not null, + constraint pk_esoft_del_book_esoft_del_user primary key (esoft_del_book_id,esoft_del_user_id) +); + +create table esoft_del_down ( + id bigint auto_increment not null, + esoft_del_mid_id bigint not null, + down varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_down primary key (id) +); + +create table esoft_del_mid ( + id bigint auto_increment not null, + top_id bigint, + mid varchar(255), + up_id bigint, + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_mid primary key (id) +); + +create table esoft_del_one_a ( + id bigint auto_increment not null, + name varchar(255), + oneb_id bigint, + deleted tinyint(1) default 0 not null, + version bigint not null, + constraint uq_esoft_del_one_a_oneb_id unique (oneb_id), + constraint pk_esoft_del_one_a primary key (id) +); + +create table esoft_del_one_b ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_esoft_del_one_b primary key (id) +); + +create table esoft_del_role ( + id bigint auto_increment not null, + role_name varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_role primary key (id) +); + +create table esoft_del_role_esoft_del_user ( + esoft_del_role_id bigint not null, + esoft_del_user_id bigint not null, + constraint pk_esoft_del_role_esoft_del_user primary key (esoft_del_role_id,esoft_del_user_id) +); + +create table esoft_del_top ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_top primary key (id) +); + +create table esoft_del_up ( + id bigint auto_increment not null, + up varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_up primary key (id) +); + +create table esoft_del_user ( + id bigint auto_increment not null, + user_name varchar(255), + version bigint not null, + deleted tinyint(1) default 0 not null, + constraint pk_esoft_del_user primary key (id) +); + +create table esoft_del_user_esoft_del_role ( + esoft_del_user_id bigint not null, + esoft_del_role_id bigint not null, + constraint pk_esoft_del_user_esoft_del_role primary key (esoft_del_user_id,esoft_del_role_id) +); + +create table esome_convert_type ( + id bigint auto_increment not null, + name varchar(255), + money decimal(38), + constraint pk_esome_convert_type primary key (id) +); + create table esome_type ( id integer auto_increment not null, currency varchar(3), @@ -624,6 +1122,14 @@ create table etrans_many ( constraint pk_etrans_many primary key (id) ); +create table rawinherit_uncle ( + id integer auto_increment not null, + name varchar(255), + parent_id bigint not null, + version bigint not null, + constraint pk_rawinherit_uncle primary key (id) +); + create table evanilla_collection ( id integer auto_increment not null, name varchar(255), @@ -640,11 +1146,11 @@ create table evanilla_collection_detail ( create table ewho_props ( id bigint auto_increment not null, name varchar(255), - who_created varchar(255) not null, - who_modified varchar(255) not null, version bigint not null, when_created datetime(6) not null, when_modified datetime(6) not null, + who_created varchar(255) not null, + who_modified varchar(255) not null, constraint pk_ewho_props primary key (id) ); @@ -671,6 +1177,14 @@ create table td_parent ( constraint pk_td_parent primary key (parent_id) ); +create table empl ( + id bigint auto_increment not null, + name varchar(255), + age integer, + default_address_id bigint, + constraint pk_empl primary key (id) +); + create table feature_desc ( id integer auto_increment not null, name varchar(255), @@ -709,9 +1223,27 @@ create table gen_key_table ( constraint pk_gen_key_table primary key (id) ); +create table grand_parent_person ( + identifier integer auto_increment not null, + name varchar(255), + age integer, + some_bean_id integer, + family_name varchar(255), + address varchar(255), + constraint pk_grand_parent_person primary key (identifier) +); + +create table survey_group ( + id bigint auto_increment not null, + name varchar(255), + categoryobjectid bigint, + sequence_number integer not null, + constraint pk_survey_group primary key (id) +); + create table c_group ( id bigint auto_increment not null, - inactive tinyint(1) default 0, + inactive tinyint(1) default 0 not null, name varchar(255), version bigint not null, when_created datetime(6) not null, @@ -719,6 +1251,58 @@ create table c_group ( constraint pk_c_group primary key (id) ); +create table he_doc ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_he_doc primary key (id) +); + +create table hx_link ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_hx_link primary key (id) +); + +create table hx_link_doc ( + hx_link_id bigint not null, + he_doc_id bigint not null, + constraint pk_hx_link_doc primary key (hx_link_id,he_doc_id) +); + +create table hi_doc ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_hi_doc primary key (id) +); + +create table hi_link ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_hi_link primary key (id) +); + +create table hi_link_doc ( + hi_link_id bigint not null, + hi_doc_id bigint not null, + constraint pk_hi_link_doc primary key (hi_link_id,hi_doc_id) +); + create table imrelated ( id bigint auto_increment not null, name varchar(255), @@ -727,17 +1311,17 @@ create table imrelated ( ); create table imroot ( - dtype varchar(10) not null, + dtype varchar(31) not null, id bigint auto_increment not null, + name varchar(255), title varchar(255), when_title datetime(6), - name varchar(255), constraint pk_imroot primary key (id) ); create table ixresource ( dtype varchar(255), - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_ixresource primary key (id) ); @@ -783,11 +1367,11 @@ create table drel_invoice ( create table item ( customer integer not null, - itemnumber varchar(255) not null, + itemnumber varchar(127) not null, description varchar(255), units varchar(255), - type integer, - region integer, + type integer not null, + region integer not null, date_modified datetime(6), date_created datetime(6), modified_by varchar(255), @@ -796,6 +1380,54 @@ create table item ( constraint pk_item primary key (customer,itemnumber) ); +create table monkey ( + mid bigint auto_increment not null, + name varchar(255), + food_preference varchar(255), + version bigint not null, + constraint pk_monkey primary key (mid) +); + +create table trainer ( + tid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_trainer primary key (tid) +); + +create table trainer_monkey ( + trainer_tid bigint not null, + monkey_mid bigint not null, + constraint uq_trainer_monkey_mid unique (monkey_mid), + constraint pk_trainer_monkey primary key (trainer_tid,monkey_mid) +); + +create table troop ( + pid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_troop primary key (pid) +); + +create table troop_monkey ( + troop_pid bigint not null, + monkey_mid bigint not null, + constraint uq_troop_monkey_mid unique (monkey_mid), + constraint pk_troop_monkey primary key (troop_pid,monkey_mid) +); + +create table l2_cldf_reset_bean ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_l2_cldf_reset_bean primary key (id) +); + +create table l2_cldf_reset_bean_child ( + id bigint auto_increment not null, + parent_id bigint, + constraint pk_l2_cldf_reset_bean_child primary key (id) +); + create table level1 ( id bigint auto_increment not null, name varchar(255), @@ -838,6 +1470,33 @@ create table level4 ( constraint pk_level4 primary key (id) ); +create table link ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + when_publish datetime(6), + link_comment varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + deleted tinyint(1) default 0 not null, + constraint pk_link primary key (id) +); + +create table link_draft ( + id bigint auto_increment not null, + name varchar(255), + location varchar(255), + when_publish datetime(6), + link_comment varchar(255), + dirty tinyint(1) default 0 not null, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + deleted tinyint(1) default 0 not null, + constraint pk_link_draft primary key (id) +); + create table la_attr_value ( id integer auto_increment not null, name varchar(255), @@ -866,7 +1525,7 @@ create table non_updateprop ( non_enum varchar(5), name varchar(255), note varchar(255), - constraint ck_non_updateprop_non_enum check (non_enum in ('BEGIN','END')), + constraint ck_non_updateprop_non_enum check ( non_enum in ('BEGIN','END')), constraint pk_non_updateprop primary key (id) ); @@ -889,7 +1548,7 @@ create table mprinter ( create table mprinter_state ( id bigint auto_increment not null, - flags bigint, + flags bigint not null, printer_id bigint, version bigint not null, constraint pk_mprinter_state primary key (id) @@ -939,6 +1598,32 @@ create table muser_type ( constraint pk_muser_type primary key (id) ); +create table mail_box ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_mail_box primary key (id) +); + +create table mail_user ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_mail_user primary key (id) +); + +create table mail_user_inbox ( + mail_user_id bigint not null, + mail_box_id bigint not null, + constraint pk_mail_user_inbox primary key (mail_user_id,mail_box_id) +); + +create table mail_user_outbox ( + mail_user_id bigint not null, + mail_box_id bigint not null, + constraint pk_mail_user_outbox primary key (mail_user_id,mail_box_id) +); + create table map_super_actual ( id bigint auto_increment not null, name varchar(255), @@ -979,6 +1664,53 @@ create table mnoc_user_mnoc_role ( constraint pk_mnoc_user_mnoc_role primary key (mnoc_user_user_id,mnoc_role_role_id) ); +create table mny_a ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_mny_a primary key (id) +); + +create table mny_b ( + id bigint auto_increment not null, + name varchar(255), + a_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_mny_b primary key (id) +); + +create table mny_b_mny_c ( + mny_b_id bigint not null, + mny_c_id bigint not null, + constraint pk_mny_b_mny_c primary key (mny_b_id,mny_c_id) +); + +create table mny_c ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_mny_c primary key (id) +); + +create table mny_topic ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_mny_topic primary key (id) +); + +create table subtopics ( + topic bigint not null, + subtopic bigint not null, + constraint pk_subtopics primary key (topic,subtopic) +); + create table mp_role ( id bigint auto_increment not null, mp_user_id bigint not null, @@ -993,10 +1725,38 @@ create table mp_user ( constraint pk_mp_user primary key (id) ); +create table ms_many_a ( + aid bigint auto_increment not null, + name varchar(255), + ms_many_a_many_b tinyint(1) default 0 not null, + ms_many_b tinyint(1) default 0 not null, + deleted tinyint(1) default 0 not null, + constraint pk_ms_many_a primary key (aid) +); + +create table ms_many_a_many_b ( + ms_many_a_aid bigint not null, + ms_many_b_bid bigint not null, + constraint pk_ms_many_a_many_b primary key (ms_many_a_aid,ms_many_b_bid) +); + +create table ms_many_b ( + bid bigint auto_increment not null, + name varchar(255), + deleted tinyint(1) default 0 not null, + constraint pk_ms_many_b primary key (bid) +); + +create table ms_many_b_many_a ( + ms_many_b_bid bigint not null, + ms_many_a_aid bigint not null, + constraint pk_ms_many_b_many_a primary key (ms_many_b_bid,ms_many_a_aid) +); + create table my_lob_size ( id integer auto_increment not null, name varchar(255), - my_count integer, + my_count integer not null, my_lob longtext, constraint pk_my_lob_size primary key (id) ); @@ -1033,6 +1793,23 @@ create table o_cached_bean_child ( constraint pk_o_cached_bean_child primary key (id) ); +create table o_cached_natkey ( + id bigint auto_increment not null, + store varchar(255), + sku varchar(255), + description varchar(255), + constraint pk_o_cached_natkey primary key (id) +); + +create table o_cached_natkey3 ( + id bigint auto_increment not null, + store varchar(255), + code integer not null, + sku varchar(255), + description varchar(255), + constraint pk_o_cached_natkey3 primary key (id) +); + create table ocar ( id integer auto_increment not null, vin varchar(255), @@ -1043,8 +1820,18 @@ create table ocar ( constraint pk_ocar primary key (id) ); +create table ocompany ( + id integer auto_increment not null, + corp_id varchar(50), + cretime datetime(6) not null, + updtime datetime(6) not null, + version bigint not null, + constraint uq_ocompany_corp_id unique (corp_id), + constraint pk_ocompany primary key (id) +); + create table oengine ( - engine_id binary(16) not null, + engine_id varchar(40) not null, short_desc varchar(255), car_id integer, version integer not null, @@ -1053,7 +1840,7 @@ create table oengine ( ); create table ogear_box ( - id binary(16) not null, + id varchar(40) not null, box_desc varchar(255), box_size integer, car_id integer, @@ -1062,6 +1849,32 @@ create table ogear_box ( constraint pk_ogear_box primary key (id) ); +create table oroad_show_msg ( + id integer auto_increment not null, + company_id integer not null, + cretime datetime(6) not null, + updtime datetime(6) not null, + version bigint not null, + constraint uq_oroad_show_msg_company_id unique (company_id), + constraint pk_oroad_show_msg primary key (id) +); + +create table om_ordered_detail ( + id bigint auto_increment not null, + name varchar(255), + master_id bigint, + version bigint not null, + sort_order integer, + constraint pk_om_ordered_detail primary key (id) +); + +create table om_ordered_master ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_om_ordered_master primary key (id) +); + create table o_order ( id integer auto_increment not null, status integer, @@ -1070,13 +1883,13 @@ create table o_order ( kcustomer_id integer not null, cretime datetime(6) not null, updtime datetime(6) not null, - constraint ck_o_order_status check (status in (0,1,2,3)), + constraint ck_o_order_status check ( status in (0,1,2,3)), constraint pk_o_order primary key (id) ); create table o_order_detail ( id integer auto_increment not null, - order_id integer, + order_id integer not null, order_qty integer, ship_qty integer, unit_price double, @@ -1087,15 +1900,15 @@ create table o_order_detail ( ); create table s_orders ( - uuid varchar(255) not null, + uuid varchar(40) not null, constraint pk_s_orders primary key (uuid) ); create table s_order_items ( - uuid varchar(255) not null, + uuid varchar(40) not null, product_variant_uuid varchar(255), - order_uuid varchar(255), - quantity integer, + order_uuid varchar(40), + quantity integer not null, amount decimal(38), constraint pk_s_order_items primary key (uuid) ); @@ -1110,6 +1923,27 @@ create table or_order_ship ( constraint pk_or_order_ship primary key (id) ); +create table organisation ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_organisation primary key (id) +); + +create table oto_bchild ( + master_id bigint auto_increment not null, + child varchar(255), + constraint pk_oto_bchild primary key (master_id) +); + +create table oto_bmaster ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_oto_bmaster primary key (id) +); + create table oto_child ( id integer auto_increment not null, name varchar(255), @@ -1118,12 +1952,102 @@ create table oto_child ( constraint pk_oto_child primary key (id) ); +create table oto_cust ( + cid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_oto_cust primary key (cid) +); + +create table oto_cust_address ( + aid bigint auto_increment not null, + line1 varchar(255), + line2 varchar(255), + line3 varchar(255), + customer_cid bigint, + version bigint not null, + constraint uq_oto_cust_address_customer_cid unique (customer_cid), + constraint pk_oto_cust_address primary key (aid) +); + create table oto_master ( id bigint auto_increment not null, name varchar(255), constraint pk_oto_master primary key (id) ); +create table oto_prime ( + pid bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_oto_prime primary key (pid) +); + +create table oto_prime_extra ( + eid bigint not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_prime_extra primary key (eid) +); + +create table oto_th_many ( + id bigint auto_increment not null, + oto_th_top_id bigint not null, + many varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_oto_th_many primary key (id) +); + +create table oto_th_one ( + id bigint auto_increment not null, + one tinyint(1) default 0 not null, + many_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint uq_oto_th_one_many_id unique (many_id), + constraint pk_oto_th_one primary key (id) +); + +create table oto_th_top ( + id bigint auto_increment not null, + topp varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_oto_th_top primary key (id) +); + +create table oto_ubprime ( + pid varchar(40) not null, + name varchar(255), + version bigint not null, + constraint pk_oto_ubprime primary key (pid) +); + +create table oto_ubprime_extra ( + eid varchar(40) not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_ubprime_extra primary key (eid) +); + +create table oto_uprime ( + pid varchar(40) not null, + name varchar(255), + version bigint not null, + constraint pk_oto_uprime primary key (pid) +); + +create table oto_uprime_extra ( + eid varchar(40) not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_uprime_extra primary key (eid) +); + create table pfile ( id integer auto_increment not null, name varchar(255), @@ -1147,7 +2071,7 @@ create table pfile_content ( ); create table paggview ( - pview_id binary(16), + pview_id varchar(40), amount integer not null, constraint uq_paggview_pview_id unique (pview_id) ); @@ -1178,6 +2102,7 @@ create table rawinherit_parent ( type varchar(31) not null, id bigint auto_increment not null, val integer, + more varchar(255), constraint pk_rawinherit_parent primary key (id) ); @@ -1187,6 +2112,17 @@ create table rawinherit_parent_rawinherit_data ( constraint pk_rawinherit_parent_rawinherit_data primary key (rawinherit_parent_id,rawinherit_data_id) ); +create table parent_person ( + identifier integer auto_increment not null, + name varchar(255), + age integer, + some_bean_id integer, + parent_identifier integer, + family_name varchar(255), + address varchar(255), + constraint pk_parent_person primary key (identifier) +); + create table c_participation ( id bigint auto_increment not null, rating integer, @@ -1196,12 +2132,12 @@ create table c_participation ( version bigint not null, when_created datetime(6) not null, when_modified datetime(6) not null, - constraint ck_c_participation_type check (type in (0,1)), + constraint ck_c_participation_type check ( type in (0,1)), constraint pk_c_participation primary key (id) ); create table mt_permission ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_mt_permission primary key (id) ); @@ -1248,6 +2184,14 @@ create table phones ( constraint pk_phones primary key (id) ); +create table primary_revision ( + id bigint not null, + revision integer not null, + name varchar(255), + version bigint not null, + constraint pk_primary_revision primary key (id,revision) +); + create table o_product ( id integer auto_increment not null, sku varchar(20), @@ -1258,29 +2202,37 @@ create table o_product ( ); create table pp ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), value varchar(100) not null, constraint pk_pp primary key (id) ); create table pp_to_ww ( - pp_id binary(16) not null, - ww_id binary(16) not null, + pp_id varchar(40) not null, + ww_id varchar(40) not null, constraint pk_pp_to_ww primary key (pp_id,ww_id) ); +create table question ( + id bigint auto_increment not null, + name varchar(255), + groupobjectid bigint, + sequence_number integer not null, + constraint pk_question primary key (id) +); + create table rcustomer ( - company varchar(255) not null, - name varchar(255) not null, + company varchar(127) not null, + name varchar(127) not null, description varchar(255), constraint pk_rcustomer primary key (company,name) ); create table r_orders ( - company varchar(255) not null, + company varchar(127) not null, order_number integer not null, - customername varchar(255), + customername varchar(127), item varchar(255), constraint pk_r_orders primary key (company,order_number) ); @@ -1300,28 +2252,29 @@ create table resourcefile ( constraint pk_resourcefile primary key (id) ); -create table mt_role ( - id binary(16) not null, - name varchar(50), - tenant_id binary(16), - version bigint not null, - constraint pk_mt_role primary key (id) -); - -create table mt_role_permission ( - mt_role_id binary(16) not null, - mt_permission_id binary(16) not null, - constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) -); - create table em_role ( id bigint auto_increment not null, name varchar(255), constraint pk_em_role primary key (id) ); +create table mt_role ( + id varchar(40) not null, + name varchar(50), + tenant_id varchar(40), + version bigint not null, + constraint pk_mt_role primary key (id) +); + +create table mt_role_permission ( + mt_role_id varchar(40) not null, + mt_permission_id varchar(40) not null, + constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) +); + create table f_second ( id bigint auto_increment not null, + mod_name varchar(255), first bigint, title varchar(255), constraint uq_f_second_first unique (first), @@ -1336,7 +2289,7 @@ create table section ( cretime datetime(6) not null, updtime datetime(6) not null, version bigint not null, - constraint ck_section_type check (type in (0,1)), + constraint ck_section_type check ( type in (0,1)), constraint pk_section primary key (id) ); @@ -1366,7 +2319,7 @@ create table some_enum_bean ( id bigint auto_increment not null, some_enum integer, name varchar(255), - constraint ck_some_enum_bean_some_enum check (some_enum in (0,1)), + constraint ck_some_enum_bean_some_enum check ( some_enum in (0,1)), constraint pk_some_enum_bean primary key (id) ); @@ -1391,17 +2344,16 @@ create table some_new_types_bean ( instant datetime(6), zone_id varchar(60), zone_offset varchar(60), + path varchar(255), + period varchar(20), version bigint not null, - constraint ck_some_new_types_bean_dow check (dow in ('1','2','3','4','5','6','7')), - constraint ck_some_new_types_bean_mth check (mth in ('1','2','3','4','5','6','7','8','9','10','11','12')), + constraint ck_some_new_types_bean_dow check ( dow in (1,2,3,4,5,6,7)), + constraint ck_some_new_types_bean_mth check ( mth in (1,2,3,4,5,6,7,8,9,10,11,12)), constraint pk_some_new_types_bean primary key (id) ); create table some_period_bean ( id bigint auto_increment not null, - period_years integer, - period_months integer, - period_days integer, anniversary date, version bigint not null, constraint pk_some_period_bean primary key (id) @@ -1431,6 +2383,12 @@ create table sub_type ( constraint pk_sub_type primary key (sub_type_id) ); +create table survey ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_survey primary key (id) +); + create table tbytes_only ( id integer auto_increment not null, content longblob, @@ -1439,11 +2397,39 @@ create table tbytes_only ( create table tcar ( type varchar(31) not null, - plate_no varchar(255) not null, + plate_no varchar(32) not null, truckload bigint, constraint pk_tcar primary key (plate_no) ); +create table tevent ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + constraint pk_tevent primary key (id) +); + +create table tevent_many ( + id bigint auto_increment not null, + description varchar(255), + event_id bigint, + units integer not null, + amount double not null, + version bigint not null, + constraint pk_tevent_many primary key (id) +); + +create table tevent_one ( + id bigint auto_increment not null, + name varchar(255), + status integer, + event_id bigint, + version bigint not null, + constraint ck_tevent_one_status check ( status in (0,1)), + constraint uq_tevent_one_event_id unique (event_id), + constraint pk_tevent_one primary key (id) +); + create table tint_root ( my_type integer(3) not null, id integer auto_increment not null, @@ -1470,7 +2456,7 @@ create table t_oneb ( id integer auto_increment not null, name varchar(255), description varchar(255), - active tinyint(1) default 0, + active tinyint(1) default 0 not null, constraint pk_t_oneb primary key (id) ); @@ -1478,8 +2464,10 @@ create table t_detail_with_other_namexxxyy ( id integer auto_increment not null, name varchar(255), description varchar(255), - active tinyint(1) default 0, + some_unique_value varchar(127), + active tinyint(1) default 0 not null, master_id integer, + constraint uq_t_detail_with_other_namexxxyy_some_unique_value unique (some_unique_value), constraint pk_t_detail_with_other_namexxxyy primary key (id) ); @@ -1487,7 +2475,7 @@ create table ts_detail_two ( id integer auto_increment not null, name varchar(255), description varchar(255), - active tinyint(1) default 0, + active tinyint(1) default 0 not null, master_id integer, constraint pk_ts_detail_two primary key (id) ); @@ -1496,7 +2484,7 @@ create table t_atable_thatisrelatively ( id integer auto_increment not null, name varchar(255), description varchar(255), - active tinyint(1) default 0, + active tinyint(1) default 0 not null, constraint pk_t_atable_thatisrelatively primary key (id) ); @@ -1504,19 +2492,19 @@ create table ts_master_two ( id integer auto_increment not null, name varchar(255), description varchar(255), - active tinyint(1) default 0, + active tinyint(1) default 0 not null, constraint pk_ts_master_two primary key (id) ); create table tuuid_entity ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_tuuid_entity primary key (id) ); create table twheel ( id bigint auto_increment not null, - owner_plate_no varchar(255) not null, + owner_plate_no varchar(32) not null, constraint pk_twheel primary key (id) ); @@ -1528,16 +2516,20 @@ create table twith_pre_insert ( ); create table mt_tenant ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), version bigint not null, constraint pk_mt_tenant primary key (id) ); -create table sa_tire ( - id bigint auto_increment not null, - version integer not null, - constraint pk_sa_tire primary key (id) +create table test_annotation_base_entity ( + direct varchar(255), + meta varchar(255), + mixed varchar(255), + constraint_annotation varchar(40), + null1 varchar(255) not null, + null2 varchar(255), + null3 varchar(255) ); create table tire ( @@ -1548,6 +2540,12 @@ create table tire ( constraint pk_tire primary key (id) ); +create table sa_tire ( + id bigint auto_increment not null, + version integer not null, + constraint pk_sa_tire primary key (id) +); + create table trip ( id integer auto_increment not null, vehicle_driver_id integer, @@ -1575,6 +2573,14 @@ create table type ( constraint pk_type primary key (customer,type) ); +create table tz_bean ( + id bigint auto_increment not null, + moda varchar(255), + ts datetime(6), + tstz datetime(6), + constraint pk_tz_bean primary key (id) +); + create table ut_detail ( id integer auto_increment not null, utmaster_id integer not null, @@ -1594,22 +2600,29 @@ create table ut_master ( ); create table uuone ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), constraint pk_uuone primary key (id) ); create table uutwo ( - id binary(16) not null, + id varchar(40) not null, name varchar(255), - master_id binary(16), + master_id varchar(40), constraint pk_uutwo primary key (id) ); -create table em_user ( +create table c_user ( id bigint auto_increment not null, + inactive tinyint(1) default 0 not null, name varchar(255), - constraint pk_em_user primary key (id) + email varchar(255), + password_hash varchar(255), + group_id bigint, + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + constraint pk_c_user primary key (id) ); create table tx_user ( @@ -1618,16 +2631,17 @@ create table tx_user ( constraint pk_tx_user primary key (id) ); -create table c_user ( +create table g_user ( id bigint auto_increment not null, - inactive tinyint(1) default 0, - name varchar(255), - email varchar(255), - group_id bigint, + username varchar(255), version bigint not null, - when_created datetime(6) not null, - when_modified datetime(6) not null, - constraint pk_c_user primary key (id) + constraint pk_g_user primary key (id) +); + +create table em_user ( + id bigint auto_increment not null, + name varchar(255), + constraint pk_em_user primary key (id) ); create table oto_user ( @@ -1655,10 +2669,13 @@ create table vehicle ( cretime datetime(6) not null, updtime datetime(6) not null, version bigint not null, - truck_ref_id integer, - capacity double, + siz varchar(1), driver varchar(255), car_ref_id integer, + notes varchar(255), + truck_ref_id integer, + capacity double, + constraint ck_vehicle_siz check ( siz in ('S','M','L','H')), constraint pk_vehicle primary key (id) ); @@ -1694,22 +2711,34 @@ create table sa_wheel ( constraint pk_sa_wheel primary key (id) ); -create table sp_car_wheel ( - id bigint auto_increment not null, - version integer not null, - constraint pk_sp_car_wheel primary key (id) -); - create table wheel ( id bigint auto_increment not null, version integer not null, constraint pk_wheel primary key (id) ); +create table sp_car_wheel ( + id bigint auto_increment not null, + version integer not null, + constraint pk_sp_car_wheel primary key (id) +); + +create table g_who_props_otm ( + id bigint auto_increment not null, + name varchar(255), + version bigint not null, + when_created datetime(6) not null, + when_modified datetime(6) not null, + who_created_id bigint, + who_modified_id bigint, + constraint pk_g_who_props_otm primary key (id) +); + create table with_zero ( id bigint auto_increment not null, name varchar(255), parent_id integer, + lang varchar(2) default 'en' not null, version bigint not null, constraint pk_with_zero primary key (id) ); @@ -1721,8 +2750,8 @@ create table parent ( ); create table wview ( - id binary(16) not null, - name varchar(255) not null, + id varchar(40) not null, + name varchar(127) not null, constraint uq_wview_name unique (name), constraint pk_wview primary key (id) ); @@ -1734,133 +2763,288 @@ create table zones ( constraint pk_zones primary key (id) ); -alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id) on delete restrict on update restrict; +create index ix_contact_last_name_first_name on contact (last_name,first_name); +create index ix_e_basic_name on e_basic (name); create index ix_bar_foo_id on bar (foo_id); +alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id) on delete restrict on update restrict; + +create index ix_addr_employee_id on addr (employee_id); +alter table addr add constraint fk_addr_employee_id foreign key (employee_id) references empl (id) on delete restrict on update restrict; -alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code) on delete restrict on update restrict; create index ix_o_address_country_code on o_address (country_code); +alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code) on delete restrict on update restrict; -alter table animals add constraint fk_animals_shelter_id foreign key (shelter_id) references animal_shelter (id) on delete restrict on update restrict; -create index ix_animals_shelter_id on animals (shelter_id); +alter table album add constraint fk_album_cover_id foreign key (cover_id) references cover (id) on delete restrict on update restrict; + +create index ix_animal_shelter_id on animal (shelter_id); +alter table animal add constraint fk_animal_shelter_id foreign key (shelter_id) references animal_shelter (id) on delete restrict on update restrict; -alter table attribute add constraint fk_attribute_attribute_holder_id foreign key (attribute_holder_id) references attribute_holder (id) on delete restrict on update restrict; create index ix_attribute_attribute_holder_id on attribute (attribute_holder_id); +alter table attribute add constraint fk_attribute_attribute_holder_id foreign key (attribute_holder_id) references attribute_holder (id) on delete restrict on update restrict; -alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id) on delete restrict on update restrict; create index ix_bbookmark_user_id on bbookmark (user_id); +alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id) on delete restrict on update restrict; + +create index ix_bsite_user_site_id on bsite_user (site_id); +alter table bsite_user add constraint fk_bsite_user_site_id foreign key (site_id) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_user_id on bsite_user (user_id); +alter table bsite_user add constraint fk_bsite_user_user_id foreign key (user_id) references buser (id) on delete restrict on update restrict; + +create index ix_bsite_user_b_site on bsite_user_b (site); +alter table bsite_user_b add constraint fk_bsite_user_b_site foreign key (site) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_b_usr on bsite_user_b (usr); +alter table bsite_user_b add constraint fk_bsite_user_b_usr foreign key (usr) references buser (id) on delete restrict on update restrict; + +create index ix_bsite_user_c_site_uid on bsite_user_c (site_uid); +alter table bsite_user_c add constraint fk_bsite_user_c_site_uid foreign key (site_uid) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_c_user_uid on bsite_user_c (user_uid); +alter table bsite_user_c add constraint fk_bsite_user_c_user_uid foreign key (user_uid) references buser (id) on delete restrict on update restrict; alter table drel_booking add constraint fk_drel_booking_agent_invoice foreign key (agent_invoice) references drel_invoice (id) on delete restrict on update restrict; alter table drel_booking add constraint fk_drel_booking_client_invoice foreign key (client_invoice) references drel_invoice (id) on delete restrict on update restrict; -alter table ckey_detail add constraint fk_ckey_detail_ckey_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key) on delete restrict on update restrict; -create index ix_ckey_detail_one_key_two_key on ckey_detail (one_key,two_key); +create index ix_ckey_detail_parent on ckey_detail (one_key,two_key); +alter table ckey_detail add constraint fk_ckey_detail_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key) on delete restrict on update restrict; -alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id) on delete restrict on update restrict; create index ix_ckey_parent_assoc_id on ckey_parent (assoc_id); +alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id) on delete restrict on update restrict; -alter table calculation_result add constraint fk_calculation_result_product_configuration_id foreign key (product_configuration_id) references configuration (id) on delete restrict on update restrict; create index ix_calculation_result_product_configuration_id on calculation_result (product_configuration_id); +alter table calculation_result add constraint fk_calculation_result_product_configuration_id foreign key (product_configuration_id) references configuration (id) on delete restrict on update restrict; -alter table calculation_result add constraint fk_calculation_result_group_configuration_id foreign key (group_configuration_id) references configuration (id) on delete restrict on update restrict; create index ix_calculation_result_group_configuration_id on calculation_result (group_configuration_id); +alter table calculation_result add constraint fk_calculation_result_group_configuration_id foreign key (group_configuration_id) references configuration (id) on delete restrict on update restrict; +create index ix_sp_car_car_wheels_sp_car_car on sp_car_car_wheels (car); alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_car foreign key (car) references sp_car_car (id) on delete restrict on update restrict; -create index ix_sp_car_car_wheels_car on sp_car_car_wheels (car); +create index ix_sp_car_car_wheels_sp_car_wheel on sp_car_car_wheels (wheel); alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_wheel foreign key (wheel) references sp_car_wheel (id) on delete restrict on update restrict; -create index ix_sp_car_car_wheels_wheel on sp_car_car_wheels (wheel); -alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id) on delete restrict on update restrict; +create index ix_car_accessory_fuse_id on car_accessory (fuse_id); +alter table car_accessory add constraint fk_car_accessory_fuse_id foreign key (fuse_id) references car_fuse (id) on delete restrict on update restrict; + create index ix_car_accessory_car_id on car_accessory (car_id); +alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id) on delete restrict on update restrict; + +create index ix_category_surveyobjectid on category (surveyobjectid); +alter table category add constraint fk_category_surveyobjectid foreign key (surveyobjectid) references survey (id) on delete restrict on update restrict; + +create index ix_child_person_some_bean_id on child_person (some_bean_id); +alter table child_person add constraint fk_child_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_child_person_parent_identifier on child_person (parent_identifier); +alter table child_person add constraint fk_child_person_parent_identifier foreign key (parent_identifier) references parent_person (identifier) on delete restrict on update restrict; -alter table configuration add constraint fk_configuration_configurations_id foreign key (configurations_id) references configurations (id) on delete restrict on update restrict; create index ix_configuration_configurations_id on configuration (configurations_id); +alter table configuration add constraint fk_configuration_configurations_id foreign key (configurations_id) references configurations (id) on delete restrict on update restrict; -alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id) on delete restrict on update restrict; create index ix_contact_customer_id on contact (customer_id); +alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id) on delete restrict on update restrict; -alter table contact add constraint fk_contact_group_id foreign key (group_id) references contact_group (id) on delete restrict on update restrict; create index ix_contact_group_id on contact (group_id); +alter table contact add constraint fk_contact_group_id foreign key (group_id) references contact_group (id) on delete restrict on update restrict; -alter table contact_note add constraint fk_contact_note_contact_id foreign key (contact_id) references contact (id) on delete restrict on update restrict; create index ix_contact_note_contact_id on contact_note (contact_id); +alter table contact_note add constraint fk_contact_note_contact_id foreign key (contact_id) references contact (id) on delete restrict on update restrict; -alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; create index ix_c_conversation_group_id on c_conversation (group_id); +alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; -alter table o_customer add constraint fk_o_customer_billing_address_id foreign key (billing_address_id) references o_address (id) on delete restrict on update restrict; create index ix_o_customer_billing_address_id on o_customer (billing_address_id); +alter table o_customer add constraint fk_o_customer_billing_address_id foreign key (billing_address_id) references o_address (id) on delete restrict on update restrict; -alter table o_customer add constraint fk_o_customer_shipping_address_id foreign key (shipping_address_id) references o_address (id) on delete restrict on update restrict; create index ix_o_customer_shipping_address_id on o_customer (shipping_address_id); +alter table o_customer add constraint fk_o_customer_shipping_address_id foreign key (shipping_address_id) references o_address (id) on delete restrict on update restrict; + +create index ix_dcredit_drol_dcredit on dcredit_drol (dcredit_id); +alter table dcredit_drol add constraint fk_dcredit_drol_dcredit foreign key (dcredit_id) references dcredit (id) on delete restrict on update restrict; + +create index ix_dcredit_drol_drol on dcredit_drol (drol_id); +alter table dcredit_drol add constraint fk_dcredit_drol_drol foreign key (drol_id) references drol (id) on delete restrict on update restrict; + +create index ix_drot_drol_drot on drot_drol (drot_id); +alter table drot_drol add constraint fk_drot_drol_drot foreign key (drot_id) references drot (id) on delete restrict on update restrict; + +create index ix_drot_drol_drol on drot_drol (drol_id); +alter table drot_drol add constraint fk_drot_drol_drol foreign key (drol_id) references drol (id) on delete restrict on update restrict; + +create index ix_dfk_cascade_one_id on dfk_cascade (one_id); +alter table dfk_cascade add constraint fk_dfk_cascade_one_id foreign key (one_id) references dfk_cascade_one (id) on delete cascade on update cascade; + +create index ix_dfk_set_null_one_id on dfk_set_null (one_id); +alter table dfk_set_null add constraint fk_dfk_set_null_one_id foreign key (one_id) references dfk_one (id) on delete set null on update set null; + +alter table doc add constraint fk_doc_id foreign key (id) references doc_draft (id) on delete restrict on update restrict; + +create index ix_doc_link_doc on doc_link (doc_id); +alter table doc_link add constraint fk_doc_link_doc foreign key (doc_id) references doc (id) on delete restrict on update restrict; + +create index ix_doc_link_link on doc_link (link_id); +alter table doc_link add constraint fk_doc_link_link foreign key (link_id) references link (id) on delete restrict on update restrict; + +alter table document add constraint fk_document_id foreign key (id) references document_draft (id) on delete restrict on update restrict; + +create index ix_document_organisation_id on document (organisation_id); +alter table document add constraint fk_document_organisation_id foreign key (organisation_id) references organisation (id) on delete restrict on update restrict; + +create index ix_document_draft_organisation_id on document_draft (organisation_id); +alter table document_draft add constraint fk_document_draft_organisation_id foreign key (organisation_id) references organisation (id) on delete restrict on update restrict; + +create index ix_document_media_document_id on document_media (document_id); +alter table document_media add constraint fk_document_media_document_id foreign key (document_id) references document (id) on delete restrict on update restrict; + +create index ix_document_media_draft_document_id on document_media_draft (document_id); +alter table document_media_draft add constraint fk_document_media_draft_document_id foreign key (document_id) references document_draft (id) on delete restrict on update restrict; + +create index ix_ebasic_json_map_detail_owner_id on ebasic_json_map_detail (owner_id); +alter table ebasic_json_map_detail add constraint fk_ebasic_json_map_detail_owner_id foreign key (owner_id) references ebasic_json_map (id) on delete restrict on update restrict; + +create index ix_ebasic_no_sdchild_owner_id on ebasic_no_sdchild (owner_id); +alter table ebasic_no_sdchild add constraint fk_ebasic_no_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id) on delete restrict on update restrict; + +create index ix_ebasic_sdchild_owner_id on ebasic_sdchild (owner_id); +alter table ebasic_sdchild add constraint fk_ebasic_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id) on delete restrict on update restrict; -alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id) on delete restrict on update restrict; create index ix_eemb_inner_outer_id on eemb_inner (outer_id); +alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id) on delete restrict on update restrict; -alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id) on delete restrict on update restrict; create index ix_einvoice_person_id on einvoice (person_id); +alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id) on delete restrict on update restrict; -alter table enull_collection_detail add constraint fk_enull_collection_detail_enull_collection_id foreign key (enull_collection_id) references enull_collection (id) on delete restrict on update restrict; create index ix_enull_collection_detail_enull_collection_id on enull_collection_detail (enull_collection_id); +alter table enull_collection_detail add constraint fk_enull_collection_detail_enull_collection_id foreign key (enull_collection_id) references enull_collection (id) on delete restrict on update restrict; -alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id) on delete restrict on update restrict; create index ix_eopt_one_a_b_id on eopt_one_a (b_id); +alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id) on delete restrict on update restrict; -alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id) on delete restrict on update restrict; create index ix_eopt_one_b_c_id on eopt_one_b (c_id); +alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_lend_by_id on esoft_del_book (lend_by_id); +alter table esoft_del_book add constraint fk_esoft_del_book_lend_by_id foreign key (lend_by_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_esoft_del_user_esoft_del_book on esoft_del_book_esoft_del_user (esoft_del_book_id); +alter table esoft_del_book_esoft_del_user add constraint fk_esoft_del_book_esoft_del_user_esoft_del_book foreign key (esoft_del_book_id) references esoft_del_book (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_esoft_del_user_esoft_del_user on esoft_del_book_esoft_del_user (esoft_del_user_id); +alter table esoft_del_book_esoft_del_user add constraint fk_esoft_del_book_esoft_del_user_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_down_esoft_del_mid_id on esoft_del_down (esoft_del_mid_id); +alter table esoft_del_down add constraint fk_esoft_del_down_esoft_del_mid_id foreign key (esoft_del_mid_id) references esoft_del_mid (id) on delete restrict on update restrict; + +create index ix_esoft_del_mid_top_id on esoft_del_mid (top_id); +alter table esoft_del_mid add constraint fk_esoft_del_mid_top_id foreign key (top_id) references esoft_del_top (id) on delete restrict on update restrict; + +create index ix_esoft_del_mid_up_id on esoft_del_mid (up_id); +alter table esoft_del_mid add constraint fk_esoft_del_mid_up_id foreign key (up_id) references esoft_del_up (id) on delete restrict on update restrict; + +alter table esoft_del_one_a add constraint fk_esoft_del_one_a_oneb_id foreign key (oneb_id) references esoft_del_one_b (id) on delete restrict on update restrict; + +create index ix_esoft_del_role_esoft_del_user_esoft_del_role on esoft_del_role_esoft_del_user (esoft_del_role_id); +alter table esoft_del_role_esoft_del_user add constraint fk_esoft_del_role_esoft_del_user_esoft_del_role foreign key (esoft_del_role_id) references esoft_del_role (id) on delete restrict on update restrict; + +create index ix_esoft_del_role_esoft_del_user_esoft_del_user on esoft_del_role_esoft_del_user (esoft_del_user_id); +alter table esoft_del_role_esoft_del_user add constraint fk_esoft_del_role_esoft_del_user_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_user_esoft_del_role_esoft_del_user on esoft_del_user_esoft_del_role (esoft_del_user_id); +alter table esoft_del_user_esoft_del_role add constraint fk_esoft_del_user_esoft_del_role_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_user_esoft_del_role_esoft_del_role on esoft_del_user_esoft_del_role (esoft_del_role_id); +alter table esoft_del_user_esoft_del_role add constraint fk_esoft_del_user_esoft_del_role_esoft_del_role foreign key (esoft_del_role_id) references esoft_del_role (id) on delete restrict on update restrict; + +create index ix_rawinherit_uncle_parent_id on rawinherit_uncle (parent_id); +alter table rawinherit_uncle add constraint fk_rawinherit_uncle_parent_id foreign key (parent_id) references rawinherit_parent (id) on delete restrict on update restrict; -alter table evanilla_collection_detail add constraint fk_evanilla_collection_detail_evanilla_collection_id foreign key (evanilla_collection_id) references evanilla_collection (id) on delete restrict on update restrict; create index ix_evanilla_collection_detail_evanilla_collection_id on evanilla_collection_detail (evanilla_collection_id); +alter table evanilla_collection_detail add constraint fk_evanilla_collection_detail_evanilla_collection_id foreign key (evanilla_collection_id) references evanilla_collection (id) on delete restrict on update restrict; -alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id) on delete restrict on update restrict; create index ix_td_child_parent_id on td_child (parent_id); +alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id) on delete restrict on update restrict; + +create index ix_empl_default_address_id on empl (default_address_id); +alter table empl add constraint fk_empl_default_address_id foreign key (default_address_id) references addr (id) on delete restrict on update restrict; + +create index ix_grand_parent_person_some_bean_id on grand_parent_person (some_bean_id); +alter table grand_parent_person add constraint fk_grand_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_survey_group_categoryobjectid on survey_group (categoryobjectid); +alter table survey_group add constraint fk_survey_group_categoryobjectid foreign key (categoryobjectid) references category (id) on delete restrict on update restrict; + +create index ix_hx_link_doc_hx_link on hx_link_doc (hx_link_id); +alter table hx_link_doc add constraint fk_hx_link_doc_hx_link foreign key (hx_link_id) references hx_link (id) on delete restrict on update restrict; + +create index ix_hx_link_doc_he_doc on hx_link_doc (he_doc_id); +alter table hx_link_doc add constraint fk_hx_link_doc_he_doc foreign key (he_doc_id) references he_doc (id) on delete restrict on update restrict; + +create index ix_hi_link_doc_hi_link on hi_link_doc (hi_link_id); +alter table hi_link_doc add constraint fk_hi_link_doc_hi_link foreign key (hi_link_id) references hi_link (id) on delete restrict on update restrict; + +create index ix_hi_link_doc_hi_doc on hi_link_doc (hi_doc_id); +alter table hi_link_doc add constraint fk_hi_link_doc_hi_doc foreign key (hi_doc_id) references hi_doc (id) on delete restrict on update restrict; -alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id) on delete restrict on update restrict; create index ix_imrelated_owner_id on imrelated (owner_id); +alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id) on delete restrict on update restrict; -alter table info_contact add constraint fk_info_contact_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; create index ix_info_contact_company_id on info_contact (company_id); +alter table info_contact add constraint fk_info_contact_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; alter table info_customer add constraint fk_info_customer_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; alter table inner_report add constraint fk_inner_report_forecast_id foreign key (forecast_id) references stockforecast (id) on delete restrict on update restrict; -alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id) on delete restrict on update restrict; create index ix_drel_invoice_booking on drel_invoice (booking); +alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id) on delete restrict on update restrict; -alter table item add constraint fk_item_type foreign key (customer,type) references type (customer,type) on delete restrict on update restrict; -create index ix_item_customer_type on item (customer,type); +create index ix_item_etype on item (customer,type); +alter table item add constraint fk_item_etype foreign key (customer,type) references type (customer,type) on delete restrict on update restrict; -alter table item add constraint fk_item_region foreign key (customer,region) references region (customer,type) on delete restrict on update restrict; -create index ix_item_customer_region on item (customer,region); +create index ix_item_eregion on item (customer,region); +alter table item add constraint fk_item_eregion foreign key (customer,region) references region (customer,type) on delete restrict on update restrict; +alter table trainer_monkey add constraint fk_trainer_monkey_trainer foreign key (trainer_tid) references trainer (tid) on delete restrict on update restrict; + +alter table trainer_monkey add constraint fk_trainer_monkey_monkey foreign key (monkey_mid) references monkey (mid) on delete restrict on update restrict; + +alter table troop_monkey add constraint fk_troop_monkey_troop foreign key (troop_pid) references troop (pid) on delete restrict on update restrict; + +alter table troop_monkey add constraint fk_troop_monkey_monkey foreign key (monkey_mid) references monkey (mid) on delete restrict on update restrict; + +create index ix_l2_cldf_reset_bean_child_parent_id on l2_cldf_reset_bean_child (parent_id); +alter table l2_cldf_reset_bean_child add constraint fk_l2_cldf_reset_bean_child_parent_id foreign key (parent_id) references l2_cldf_reset_bean (id) on delete restrict on update restrict; + +create index ix_level1_level4_level1 on level1_level4 (level1_id); alter table level1_level4 add constraint fk_level1_level4_level1 foreign key (level1_id) references level1 (id) on delete restrict on update restrict; -create index ix_level1_level4_level1_id on level1_level4 (level1_id); +create index ix_level1_level4_level4 on level1_level4 (level4_id); alter table level1_level4 add constraint fk_level1_level4_level4 foreign key (level4_id) references level4 (id) on delete restrict on update restrict; -create index ix_level1_level4_level4_id on level1_level4 (level4_id); +create index ix_level1_level2_level1 on level1_level2 (level1_id); alter table level1_level2 add constraint fk_level1_level2_level1 foreign key (level1_id) references level1 (id) on delete restrict on update restrict; -create index ix_level1_level2_level1_id on level1_level2 (level1_id); +create index ix_level1_level2_level2 on level1_level2 (level2_id); alter table level1_level2 add constraint fk_level1_level2_level2 foreign key (level2_id) references level2 (id) on delete restrict on update restrict; -create index ix_level1_level2_level2_id on level1_level2 (level2_id); +create index ix_level2_level3_level2 on level2_level3 (level2_id); alter table level2_level3 add constraint fk_level2_level3_level2 foreign key (level2_id) references level2 (id) on delete restrict on update restrict; -create index ix_level2_level3_level2_id on level2_level3 (level2_id); +create index ix_level2_level3_level3 on level2_level3 (level3_id); alter table level2_level3 add constraint fk_level2_level3_level3 foreign key (level3_id) references level3 (id) on delete restrict on update restrict; -create index ix_level2_level3_level3_id on level2_level3 (level3_id); +alter table link add constraint fk_link_id foreign key (id) references link_draft (id) on delete restrict on update restrict; + +create index ix_la_attr_value_attribute_la_attr_value on la_attr_value_attribute (la_attr_value_id); alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_la_attr_value foreign key (la_attr_value_id) references la_attr_value (id) on delete restrict on update restrict; -create index ix_la_attr_value_attribute_la_attr_value_id on la_attr_value_attribute (la_attr_value_id); +create index ix_la_attr_value_attribute_attribute on la_attr_value_attribute (attribute_id); alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_attribute foreign key (attribute_id) references attribute (id) on delete restrict on update restrict; -create index ix_la_attr_value_attribute_attribute_id on la_attr_value_attribute (attribute_id); -alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id) on delete restrict on update restrict; create index ix_mprinter_current_state_id on mprinter (current_state_id); +alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_cyan_id foreign key (last_swap_cyan_id) references mprinter_state (id) on delete restrict on update restrict; @@ -1870,205 +3054,407 @@ alter table mprinter add constraint fk_mprinter_last_swap_yellow_id foreign key alter table mprinter add constraint fk_mprinter_last_swap_black_id foreign key (last_swap_black_id) references mprinter_state (id) on delete restrict on update restrict; -alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id) on delete restrict on update restrict; create index ix_mprinter_state_printer_id on mprinter_state (printer_id); +alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id) on delete restrict on update restrict; -alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_id) references mmedia (id) on delete restrict on update restrict; create index ix_mprofile_picture_id on mprofile (picture_id); +alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_id) references mmedia (id) on delete restrict on update restrict; +create index ix_mrole_muser_mrole on mrole_muser (mrole_roleid); alter table mrole_muser add constraint fk_mrole_muser_mrole foreign key (mrole_roleid) references mrole (roleid) on delete restrict on update restrict; -create index ix_mrole_muser_mrole_roleid on mrole_muser (mrole_roleid); +create index ix_mrole_muser_muser on mrole_muser (muser_userid); alter table mrole_muser add constraint fk_mrole_muser_muser foreign key (muser_userid) references muser (userid) on delete restrict on update restrict; -create index ix_mrole_muser_muser_userid on mrole_muser (muser_userid); -alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id) on delete restrict on update restrict; create index ix_muser_user_type_id on muser (user_type_id); +alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id) on delete restrict on update restrict; + +create index ix_mail_user_inbox_mail_user on mail_user_inbox (mail_user_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_user foreign key (mail_user_id) references mail_user (id) on delete restrict on update restrict; + +create index ix_mail_user_inbox_mail_box on mail_user_inbox (mail_box_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_box foreign key (mail_box_id) references mail_box (id) on delete restrict on update restrict; + +create index ix_mail_user_outbox_mail_user on mail_user_outbox (mail_user_id); +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_user foreign key (mail_user_id) references mail_user (id) on delete restrict on update restrict; + +create index ix_mail_user_outbox_mail_box on mail_user_outbox (mail_box_id); +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_box foreign key (mail_box_id) references mail_box (id) on delete restrict on update restrict; -alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; create index ix_c_message_conversation_id on c_message (conversation_id); +alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; create index ix_c_message_user_id on c_message (user_id); +alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; +create index ix_mnoc_user_mnoc_role_mnoc_user on mnoc_user_mnoc_role (mnoc_user_user_id); alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_user foreign key (mnoc_user_user_id) references mnoc_user (user_id) on delete restrict on update restrict; -create index ix_mnoc_user_mnoc_role_mnoc_user_user_id on mnoc_user_mnoc_role (mnoc_user_user_id); +create index ix_mnoc_user_mnoc_role_mnoc_role on mnoc_user_mnoc_role (mnoc_role_role_id); alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_role foreign key (mnoc_role_role_id) references mnoc_role (role_id) on delete restrict on update restrict; -create index ix_mnoc_user_mnoc_role_mnoc_role_role_id on mnoc_user_mnoc_role (mnoc_role_role_id); -alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id) on delete restrict on update restrict; +create index ix_mny_b_a_id on mny_b (a_id); +alter table mny_b add constraint fk_mny_b_a_id foreign key (a_id) references mny_a (id) on delete restrict on update restrict; + +create index ix_mny_b_mny_c_mny_b on mny_b_mny_c (mny_b_id); +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_b foreign key (mny_b_id) references mny_b (id) on delete restrict on update restrict; + +create index ix_mny_b_mny_c_mny_c on mny_b_mny_c (mny_c_id); +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_c foreign key (mny_c_id) references mny_c (id) on delete restrict on update restrict; + +create index ix_subtopics_mny_topic_1 on subtopics (topic); +alter table subtopics add constraint fk_subtopics_mny_topic_1 foreign key (topic) references mny_topic (id) on delete restrict on update restrict; + +create index ix_subtopics_mny_topic_2 on subtopics (subtopic); +alter table subtopics add constraint fk_subtopics_mny_topic_2 foreign key (subtopic) references mny_topic (id) on delete restrict on update restrict; + create index ix_mp_role_mp_user_id on mp_role (mp_user_id); +alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id) on delete restrict on update restrict; + +create index ix_ms_many_a_many_b_ms_many_a on ms_many_a_many_b (ms_many_a_aid); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid) on delete restrict on update restrict; + +create index ix_ms_many_a_many_b_ms_many_b on ms_many_a_many_b (ms_many_b_bid); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid) on delete restrict on update restrict; + +create index ix_ms_many_b_many_a_ms_many_b on ms_many_b_many_a (ms_many_b_bid); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid) on delete restrict on update restrict; + +create index ix_ms_many_b_many_a_ms_many_a on ms_many_b_many_a (ms_many_a_aid); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid) on delete restrict on update restrict; -alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_parent_id foreign key (parent_id) references my_lob_size (id) on delete restrict on update restrict; create index ix_my_lob_size_join_many_parent_id on my_lob_size_join_many (parent_id); +alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_parent_id foreign key (parent_id) references my_lob_size (id) on delete restrict on update restrict; +create index ix_o_cached_bean_country_o_cached_bean on o_cached_bean_country (o_cached_bean_id); alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_cached_bean foreign key (o_cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; -create index ix_o_cached_bean_country_o_cached_bean_id on o_cached_bean_country (o_cached_bean_id); +create index ix_o_cached_bean_country_o_country on o_cached_bean_country (o_country_code); alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_country foreign key (o_country_code) references o_country (code) on delete restrict on update restrict; -create index ix_o_cached_bean_country_o_country_code on o_cached_bean_country (o_country_code); -alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cached_bean_id foreign key (cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; create index ix_o_cached_bean_child_cached_bean_id on o_cached_bean_child (cached_bean_id); +alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cached_bean_id foreign key (cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; alter table oengine add constraint fk_oengine_car_id foreign key (car_id) references ocar (id) on delete restrict on update restrict; alter table ogear_box add constraint fk_ogear_box_car_id foreign key (car_id) references ocar (id) on delete restrict on update restrict; -alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id) on delete restrict on update restrict; +alter table oroad_show_msg add constraint fk_oroad_show_msg_company_id foreign key (company_id) references ocompany (id) on delete restrict on update restrict; + +create index ix_om_ordered_detail_master_id on om_ordered_detail (master_id); +alter table om_ordered_detail add constraint fk_om_ordered_detail_master_id foreign key (master_id) references om_ordered_master (id) on delete restrict on update restrict; + create index ix_o_order_kcustomer_id on o_order (kcustomer_id); +alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id) on delete restrict on update restrict; -alter table o_order_detail add constraint fk_o_order_detail_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; create index ix_o_order_detail_order_id on o_order_detail (order_id); +alter table o_order_detail add constraint fk_o_order_detail_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; -alter table o_order_detail add constraint fk_o_order_detail_product_id foreign key (product_id) references o_product (id) on delete restrict on update restrict; create index ix_o_order_detail_product_id on o_order_detail (product_id); +alter table o_order_detail add constraint fk_o_order_detail_product_id foreign key (product_id) references o_product (id) on delete restrict on update restrict; -alter table s_order_items add constraint fk_s_order_items_order_uuid foreign key (order_uuid) references s_orders (uuid) on delete restrict on update restrict; create index ix_s_order_items_order_uuid on s_order_items (order_uuid); +alter table s_order_items add constraint fk_s_order_items_order_uuid foreign key (order_uuid) references s_orders (uuid) on delete restrict on update restrict; -alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; create index ix_or_order_ship_order_id on or_order_ship (order_id); +alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; + +alter table oto_bchild add constraint fk_oto_bchild_master_id foreign key (master_id) references oto_bmaster (id) on delete restrict on update restrict; alter table oto_child add constraint fk_oto_child_master_id foreign key (master_id) references oto_master (id) on delete restrict on update restrict; +alter table oto_cust_address add constraint fk_oto_cust_address_customer_cid foreign key (customer_cid) references oto_cust (cid) on delete restrict on update restrict; + +alter table oto_prime_extra add constraint fk_oto_prime_extra_eid foreign key (eid) references oto_prime (pid) on delete restrict on update restrict; + +create index ix_oto_th_many_oto_th_top_id on oto_th_many (oto_th_top_id); +alter table oto_th_many add constraint fk_oto_th_many_oto_th_top_id foreign key (oto_th_top_id) references oto_th_top (id) on delete restrict on update restrict; + +alter table oto_th_one add constraint fk_oto_th_one_many_id foreign key (many_id) references oto_th_many (id) on delete restrict on update restrict; + +alter table oto_ubprime_extra add constraint fk_oto_ubprime_extra_eid foreign key (eid) references oto_ubprime (pid) on delete restrict on update restrict; + +alter table oto_uprime_extra add constraint fk_oto_uprime_extra_eid foreign key (eid) references oto_uprime (pid) on delete restrict on update restrict; + alter table pfile add constraint fk_pfile_file_content_id foreign key (file_content_id) references pfile_content (id) on delete restrict on update restrict; alter table pfile add constraint fk_pfile_file_content2_id foreign key (file_content2_id) references pfile_content (id) on delete restrict on update restrict; alter table paggview add constraint fk_paggview_pview_id foreign key (pview_id) references pp (id) on delete restrict on update restrict; -alter table pallet_location add constraint fk_pallet_location_zone_sid foreign key (zone_sid) references zones (id) on delete restrict on update restrict; create index ix_pallet_location_zone_sid on pallet_location (zone_sid); +alter table pallet_location add constraint fk_pallet_location_zone_sid foreign key (zone_sid) references zones (id) on delete restrict on update restrict; alter table parcel_location add constraint fk_parcel_location_parcelid foreign key (parcelid) references parcel (parcelid) on delete restrict on update restrict; +create index ix_rawinherit_parent_rawinherit_data_rawinherit_parent on rawinherit_parent_rawinherit_data (rawinherit_parent_id); alter table rawinherit_parent_rawinherit_data add constraint fk_rawinherit_parent_rawinherit_data_rawinherit_parent foreign key (rawinherit_parent_id) references rawinherit_parent (id) on delete restrict on update restrict; -create index ix_rawinherit_parent_rawinherit_data_rawinherit_parent_id on rawinherit_parent_rawinherit_data (rawinherit_parent_id); +create index ix_rawinherit_parent_rawinherit_data_rawinherit_data on rawinherit_parent_rawinherit_data (rawinherit_data_id); alter table rawinherit_parent_rawinherit_data add constraint fk_rawinherit_parent_rawinherit_data_rawinherit_data foreign key (rawinherit_data_id) references rawinherit_data (id) on delete restrict on update restrict; -create index ix_rawinherit_parent_rawinherit_data_rawinherit_data_id on rawinherit_parent_rawinherit_data (rawinherit_data_id); -alter table c_participation add constraint fk_c_participation_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; +create index ix_parent_person_some_bean_id on parent_person (some_bean_id); +alter table parent_person add constraint fk_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_parent_person_parent_identifier on parent_person (parent_identifier); +alter table parent_person add constraint fk_parent_person_parent_identifier foreign key (parent_identifier) references grand_parent_person (identifier) on delete restrict on update restrict; + create index ix_c_participation_conversation_id on c_participation (conversation_id); +alter table c_participation add constraint fk_c_participation_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; create index ix_c_participation_user_id on c_participation (user_id); +alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; alter table persistent_file_content add constraint fk_persistent_file_content_persistent_file_id foreign key (persistent_file_id) references persistent_file (id) on delete restrict on update restrict; -alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid) on delete restrict on update restrict; create index ix_person_default_address_oid on person (default_address_oid); +alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid) on delete restrict on update restrict; -alter table phones add constraint fk_phones_person_id foreign key (person_id) references persons (id) on delete restrict on update restrict; create index ix_phones_person_id on phones (person_id); +alter table phones add constraint fk_phones_person_id foreign key (person_id) references persons (id) on delete restrict on update restrict; +create index ix_pp_to_ww_pp on pp_to_ww (pp_id); alter table pp_to_ww add constraint fk_pp_to_ww_pp foreign key (pp_id) references pp (id) on delete restrict on update restrict; -create index ix_pp_to_ww_pp_id on pp_to_ww (pp_id); +create index ix_pp_to_ww_wview on pp_to_ww (ww_id); alter table pp_to_ww add constraint fk_pp_to_ww_wview foreign key (ww_id) references wview (id) on delete restrict on update restrict; -create index ix_pp_to_ww_ww_id on pp_to_ww (ww_id); -alter table r_orders add constraint fk_r_orders_rcustomer foreign key (company,customername) references rcustomer (company,name) on delete restrict on update restrict; -create index ix_r_orders_company_customername on r_orders (company,customername); +create index ix_question_groupobjectid on question (groupobjectid); +alter table question add constraint fk_question_groupobjectid foreign key (groupobjectid) references survey_group (id) on delete restrict on update restrict; + +create index ix_r_orders_customer on r_orders (company,customername); +alter table r_orders add constraint fk_r_orders_customer foreign key (company,customername) references rcustomer (company,name) on delete restrict on update restrict; -alter table resourcefile add constraint fk_resourcefile_parentresourcefileid foreign key (parentresourcefileid) references resourcefile (id) on delete restrict on update restrict; create index ix_resourcefile_parentresourcefileid on resourcefile (parentresourcefileid); +alter table resourcefile add constraint fk_resourcefile_parentresourcefileid foreign key (parentresourcefileid) references resourcefile (id) on delete restrict on update restrict; -alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id) on delete restrict on update restrict; create index ix_mt_role_tenant_id on mt_role (tenant_id); +alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id) on delete restrict on update restrict; +create index ix_mt_role_permission_mt_role on mt_role_permission (mt_role_id); alter table mt_role_permission add constraint fk_mt_role_permission_mt_role foreign key (mt_role_id) references mt_role (id) on delete restrict on update restrict; -create index ix_mt_role_permission_mt_role_id on mt_role_permission (mt_role_id); +create index ix_mt_role_permission_mt_permission on mt_role_permission (mt_permission_id); alter table mt_role_permission add constraint fk_mt_role_permission_mt_permission foreign key (mt_permission_id) references mt_permission (id) on delete restrict on update restrict; -create index ix_mt_role_permission_mt_permission_id on mt_role_permission (mt_permission_id); alter table f_second add constraint fk_f_second_first foreign key (first) references f_first (id) on delete restrict on update restrict; -alter table section add constraint fk_section_article_id foreign key (article_id) references article (id) on delete restrict on update restrict; create index ix_section_article_id on section (article_id); +alter table section add constraint fk_section_article_id foreign key (article_id) references article (id) on delete restrict on update restrict; -alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id) on delete restrict on update restrict; create index ix_self_parent_parent_id on self_parent (parent_id); +alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id) on delete restrict on update restrict; -alter table self_ref_customer add constraint fk_self_ref_customer_referred_by_id foreign key (referred_by_id) references self_ref_customer (id) on delete restrict on update restrict; create index ix_self_ref_customer_referred_by_id on self_ref_customer (referred_by_id); +alter table self_ref_customer add constraint fk_self_ref_customer_referred_by_id foreign key (referred_by_id) references self_ref_customer (id) on delete restrict on update restrict; -alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id) on delete restrict on update restrict; create index ix_self_ref_example_parent_id on self_ref_example (parent_id); +alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id) on delete restrict on update restrict; -alter table stockforecast add constraint fk_stockforecast_inner_report_id foreign key (inner_report_id) references inner_report (id) on delete restrict on update restrict; create index ix_stockforecast_inner_report_id on stockforecast (inner_report_id); +alter table stockforecast add constraint fk_stockforecast_inner_report_id foreign key (inner_report_id) references inner_report (id) on delete restrict on update restrict; -alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id) on delete restrict on update restrict; create index ix_sub_section_section_id on sub_section (section_id); +alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id) on delete restrict on update restrict; + +create index ix_tevent_many_event_id on tevent_many (event_id); +alter table tevent_many add constraint fk_tevent_many_event_id foreign key (event_id) references tevent_one (id) on delete restrict on update restrict; + +alter table tevent_one add constraint fk_tevent_one_event_id foreign key (event_id) references tevent (id) on delete restrict on update restrict; -alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_namexxxyy_master_id foreign key (master_id) references t_atable_thatisrelatively (id) on delete restrict on update restrict; create index ix_t_detail_with_other_namexxxyy_master_id on t_detail_with_other_namexxxyy (master_id); +alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_namexxxyy_master_id foreign key (master_id) references t_atable_thatisrelatively (id) on delete restrict on update restrict; -alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id) on delete restrict on update restrict; create index ix_ts_detail_two_master_id on ts_detail_two (master_id); +alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id) on delete restrict on update restrict; -alter table twheel add constraint fk_twheel_owner_plate_no foreign key (owner_plate_no) references tcar (plate_no) on delete restrict on update restrict; create index ix_twheel_owner_plate_no on twheel (owner_plate_no); +alter table twheel add constraint fk_twheel_owner_plate_no foreign key (owner_plate_no) references tcar (plate_no) on delete restrict on update restrict; alter table tire add constraint fk_tire_wheel foreign key (wheel) references wheel (id) on delete restrict on update restrict; -alter table trip add constraint fk_trip_vehicle_driver_id foreign key (vehicle_driver_id) references vehicle_driver (id) on delete restrict on update restrict; create index ix_trip_vehicle_driver_id on trip (vehicle_driver_id); +alter table trip add constraint fk_trip_vehicle_driver_id foreign key (vehicle_driver_id) references vehicle_driver (id) on delete restrict on update restrict; -alter table trip add constraint fk_trip_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; create index ix_trip_address_id on trip (address_id); +alter table trip add constraint fk_trip_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; -alter table type add constraint fk_type_sub_type_id foreign key (sub_type_id) references sub_type (sub_type_id) on delete restrict on update restrict; create index ix_type_sub_type_id on type (sub_type_id); +alter table type add constraint fk_type_sub_type_id foreign key (sub_type_id) references sub_type (sub_type_id) on delete restrict on update restrict; -alter table ut_detail add constraint fk_ut_detail_utmaster_id foreign key (utmaster_id) references ut_master (id) on delete restrict on update restrict; create index ix_ut_detail_utmaster_id on ut_detail (utmaster_id); +alter table ut_detail add constraint fk_ut_detail_utmaster_id foreign key (utmaster_id) references ut_master (id) on delete restrict on update restrict; -alter table uutwo add constraint fk_uutwo_master_id foreign key (master_id) references uuone (id) on delete restrict on update restrict; create index ix_uutwo_master_id on uutwo (master_id); +alter table uutwo add constraint fk_uutwo_master_id foreign key (master_id) references uuone (id) on delete restrict on update restrict; -alter table c_user add constraint fk_c_user_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; create index ix_c_user_group_id on c_user (group_id); +alter table c_user add constraint fk_c_user_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; alter table oto_user add constraint fk_oto_user_account_id foreign key (account_id) references oto_account (id) on delete restrict on update restrict; -alter table em_user_role add constraint fk_em_user_role_user_id foreign key (user_id) references em_user (id) on delete restrict on update restrict; create index ix_em_user_role_user_id on em_user_role (user_id); +alter table em_user_role add constraint fk_em_user_role_user_id foreign key (user_id) references em_user (id) on delete restrict on update restrict; -alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id) on delete restrict on update restrict; create index ix_em_user_role_role_id on em_user_role (role_id); +alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id) on delete restrict on update restrict; -alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id) on delete restrict on update restrict; -create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); - -alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id) on delete restrict on update restrict; create index ix_vehicle_car_ref_id on vehicle (car_ref_id); +alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id) on delete restrict on update restrict; + +create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); +alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id) on delete restrict on update restrict; -alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id) on delete restrict on update restrict; create index ix_vehicle_driver_vehicle_id on vehicle_driver (vehicle_id); +alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id) on delete restrict on update restrict; -alter table vehicle_driver add constraint fk_vehicle_driver_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; create index ix_vehicle_driver_address_id on vehicle_driver (address_id); +alter table vehicle_driver add constraint fk_vehicle_driver_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; -alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id) on delete restrict on update restrict; create index ix_warehouses_officezoneid on warehouses (officezoneid); +alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id) on delete restrict on update restrict; +create index ix_warehousesshippingzones_warehouses on warehousesshippingzones (warehouseid); alter table warehousesshippingzones add constraint fk_warehousesshippingzones_warehouses foreign key (warehouseid) references warehouses (id) on delete restrict on update restrict; -create index ix_warehousesshippingzones_warehouseid on warehousesshippingzones (warehouseid); +create index ix_warehousesshippingzones_zones on warehousesshippingzones (shippingzoneid); alter table warehousesshippingzones add constraint fk_warehousesshippingzones_zones foreign key (shippingzoneid) references zones (id) on delete restrict on update restrict; -create index ix_warehousesshippingzones_shippingzoneid on warehousesshippingzones (shippingzoneid); -alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id) on delete restrict on update restrict; create index ix_sa_wheel_tire on sa_wheel (tire); +alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id) on delete restrict on update restrict; -alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id) on delete restrict on update restrict; create index ix_sa_wheel_car on sa_wheel (car); +alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id) on delete restrict on update restrict; + +create index ix_g_who_props_otm_who_created_id on g_who_props_otm (who_created_id); +alter table g_who_props_otm add constraint fk_g_who_props_otm_who_created_id foreign key (who_created_id) references g_user (id) on delete restrict on update restrict; + +create index ix_g_who_props_otm_who_modified_id on g_who_props_otm (who_modified_id); +alter table g_who_props_otm add constraint fk_g_who_props_otm_who_modified_id foreign key (who_modified_id) references g_user (id) on delete restrict on update restrict; -alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id) on delete restrict on update restrict; create index ix_with_zero_parent_id on with_zero (parent_id); +alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id) on delete restrict on update restrict; +alter table hx_link add column sys_period_start datetime(6) default now(6); +alter table hx_link add column sys_period_end datetime(6); +update hx_link set sys_period_start = when_created; +create table hx_link_history( + id bigint, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint, + when_created datetime(6), + when_modified datetime(6), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view hx_link_with_history as select * from hx_link union all select * from hx_link_history; + +delimiter $$ +create trigger hx_link_history_upd before update on hx_link for each row begin + insert into hx_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger hx_link_history_del before delete on hx_link for each row begin + insert into hx_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); +end$$ +alter table hi_link add column sys_period_start datetime(6) default now(6); +alter table hi_link add column sys_period_end datetime(6); +update hi_link set sys_period_start = when_created; +create table hi_link_history( + id bigint, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint, + when_created datetime(6), + when_modified datetime(6), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view hi_link_with_history as select * from hi_link union all select * from hi_link_history; + +delimiter $$ +create trigger hi_link_history_upd before update on hi_link for each row begin + insert into hi_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger hi_link_history_del before delete on hi_link for each row begin + insert into hi_link_history (sys_period_start,sys_period_end,id, name, location, comments, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); +end$$ +alter table hi_link_doc add column sys_period_start datetime(6) default now(6); +alter table hi_link_doc add column sys_period_end datetime(6); +create table hi_link_doc_history( + hi_link_id bigint, + hi_doc_id bigint, + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view hi_link_doc_with_history as select * from hi_link_doc union all select * from hi_link_doc_history; + +delimiter $$ +create trigger hi_link_doc_history_upd before update on hi_link_doc for each row begin + insert into hi_link_doc_history (sys_period_start,sys_period_end,hi_link_id, hi_doc_id) values (OLD.sys_period_start, now(6),OLD.hi_link_id, OLD.hi_doc_id); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger hi_link_doc_history_del before delete on hi_link_doc for each row begin + insert into hi_link_doc_history (sys_period_start,sys_period_end,hi_link_id, hi_doc_id) values (OLD.sys_period_start, now(6),OLD.hi_link_id, OLD.hi_doc_id); +end$$ +alter table link add column sys_period_start datetime(6) default now(6); +alter table link add column sys_period_end datetime(6); +update link set sys_period_start = when_created; +create table link_history( + id bigint, + name varchar(255), + location varchar(255), + when_publish datetime(6), + link_comment varchar(255), + version bigint, + when_created datetime(6), + when_modified datetime(6), + deleted tinyint(1), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view link_with_history as select * from link union all select * from link_history; + +delimiter $$ +create trigger link_history_upd before update on link for each row begin + insert into link_history (sys_period_start,sys_period_end,id, name, location, when_publish, link_comment, version, when_created, when_modified, deleted) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.when_publish, OLD.link_comment, OLD.version, OLD.when_created, OLD.when_modified, OLD.deleted); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger link_history_del before delete on link for each row begin + insert into link_history (sys_period_start,sys_period_end,id, name, location, when_publish, link_comment, version, when_created, when_modified, deleted) values (OLD.sys_period_start, now(6),OLD.id, OLD.name, OLD.location, OLD.when_publish, OLD.link_comment, OLD.version, OLD.when_created, OLD.when_modified, OLD.deleted); +end$$ +alter table c_user add column sys_period_start datetime(6) default now(6); +alter table c_user add column sys_period_end datetime(6); +update c_user set sys_period_start = when_created; +create table c_user_history( + id bigint, + inactive tinyint(1), + name varchar(255), + email varchar(255), + password_hash varchar(255), + group_id bigint, + version bigint, + when_created datetime(6), + when_modified datetime(6), + sys_period_start datetime(6), + sys_period_end datetime(6) +); +create view c_user_with_history as select * from c_user union all select * from c_user_history; + +delimiter $$ +create trigger c_user_history_upd before update on c_user for each row begin + insert into c_user_history (sys_period_start,sys_period_end,id, inactive, name, email, group_id, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.inactive, OLD.name, OLD.email, OLD.group_id, OLD.version, OLD.when_created, OLD.when_modified); + set NEW.sys_period_start = now(6); +end$$ +delimiter $$ +create trigger c_user_history_del before delete on c_user for each row begin + insert into c_user_history (sys_period_start,sys_period_end,id, inactive, name, email, group_id, version, when_created, when_modified) values (OLD.sys_period_start, now(6),OLD.id, OLD.inactive, OLD.name, OLD.email, OLD.group_id, OLD.version, OLD.when_created, OLD.when_modified); +end$$ diff --git a/src/test/ddl-review/mysql-drop-all.sql b/src/test/ddl-review/mysql-drop-all.sql index 592b8a5e6..5be3cc07a 100644 --- a/src/test/ddl-review/mysql-drop-all.sql +++ b/src/test/ddl-review/mysql-drop-all.sql @@ -1,11 +1,17 @@ +-- Generated by ebean unknown at 2018-03-08T06:38:18.344Z alter table bar drop foreign key fk_bar_foo_id; drop index ix_bar_foo_id on bar; +alter table addr drop foreign key fk_addr_employee_id; +drop index ix_addr_employee_id on addr; + alter table o_address drop foreign key fk_o_address_country_code; drop index ix_o_address_country_code on o_address; -alter table animals drop foreign key fk_animals_shelter_id; -drop index ix_animals_shelter_id on animals; +alter table album drop foreign key fk_album_cover_id; + +alter table animal drop foreign key fk_animal_shelter_id; +drop index ix_animal_shelter_id on animal; alter table attribute drop foreign key fk_attribute_attribute_holder_id; drop index ix_attribute_attribute_holder_id on attribute; @@ -13,12 +19,30 @@ drop index ix_attribute_attribute_holder_id on attribute; alter table bbookmark drop foreign key fk_bbookmark_user_id; drop index ix_bbookmark_user_id on bbookmark; +alter table bsite_user drop foreign key fk_bsite_user_site_id; +drop index ix_bsite_user_site_id on bsite_user; + +alter table bsite_user drop foreign key fk_bsite_user_user_id; +drop index ix_bsite_user_user_id on bsite_user; + +alter table bsite_user_b drop foreign key fk_bsite_user_b_site; +drop index ix_bsite_user_b_site on bsite_user_b; + +alter table bsite_user_b drop foreign key fk_bsite_user_b_usr; +drop index ix_bsite_user_b_usr on bsite_user_b; + +alter table bsite_user_c drop foreign key fk_bsite_user_c_site_uid; +drop index ix_bsite_user_c_site_uid on bsite_user_c; + +alter table bsite_user_c drop foreign key fk_bsite_user_c_user_uid; +drop index ix_bsite_user_c_user_uid on bsite_user_c; + alter table drel_booking drop foreign key fk_drel_booking_agent_invoice; alter table drel_booking drop foreign key fk_drel_booking_client_invoice; -alter table ckey_detail drop foreign key fk_ckey_detail_ckey_parent; -drop index ix_ckey_detail_one_key_two_key on ckey_detail; +alter table ckey_detail drop foreign key fk_ckey_detail_parent; +drop index ix_ckey_detail_parent on ckey_detail; alter table ckey_parent drop foreign key fk_ckey_parent_assoc_id; drop index ix_ckey_parent_assoc_id on ckey_parent; @@ -30,14 +54,26 @@ alter table calculation_result drop foreign key fk_calculation_result_group_conf drop index ix_calculation_result_group_configuration_id on calculation_result; alter table sp_car_car_wheels drop foreign key fk_sp_car_car_wheels_sp_car_car; -drop index ix_sp_car_car_wheels_car on sp_car_car_wheels; +drop index ix_sp_car_car_wheels_sp_car_car on sp_car_car_wheels; alter table sp_car_car_wheels drop foreign key fk_sp_car_car_wheels_sp_car_wheel; -drop index ix_sp_car_car_wheels_wheel on sp_car_car_wheels; +drop index ix_sp_car_car_wheels_sp_car_wheel on sp_car_car_wheels; + +alter table car_accessory drop foreign key fk_car_accessory_fuse_id; +drop index ix_car_accessory_fuse_id on car_accessory; alter table car_accessory drop foreign key fk_car_accessory_car_id; drop index ix_car_accessory_car_id on car_accessory; +alter table category drop foreign key fk_category_surveyobjectid; +drop index ix_category_surveyobjectid on category; + +alter table child_person drop foreign key fk_child_person_some_bean_id; +drop index ix_child_person_some_bean_id on child_person; + +alter table child_person drop foreign key fk_child_person_parent_identifier; +drop index ix_child_person_parent_identifier on child_person; + alter table configuration drop foreign key fk_configuration_configurations_id; drop index ix_configuration_configurations_id on configuration; @@ -59,6 +95,55 @@ drop index ix_o_customer_billing_address_id on o_customer; alter table o_customer drop foreign key fk_o_customer_shipping_address_id; drop index ix_o_customer_shipping_address_id on o_customer; +alter table dcredit_drol drop foreign key fk_dcredit_drol_dcredit; +drop index ix_dcredit_drol_dcredit on dcredit_drol; + +alter table dcredit_drol drop foreign key fk_dcredit_drol_drol; +drop index ix_dcredit_drol_drol on dcredit_drol; + +alter table drot_drol drop foreign key fk_drot_drol_drot; +drop index ix_drot_drol_drot on drot_drol; + +alter table drot_drol drop foreign key fk_drot_drol_drol; +drop index ix_drot_drol_drol on drot_drol; + +alter table dfk_cascade drop foreign key fk_dfk_cascade_one_id; +drop index ix_dfk_cascade_one_id on dfk_cascade; + +alter table dfk_set_null drop foreign key fk_dfk_set_null_one_id; +drop index ix_dfk_set_null_one_id on dfk_set_null; + +alter table doc drop foreign key fk_doc_id; + +alter table doc_link drop foreign key fk_doc_link_doc; +drop index ix_doc_link_doc on doc_link; + +alter table doc_link drop foreign key fk_doc_link_link; +drop index ix_doc_link_link on doc_link; + +alter table document drop foreign key fk_document_id; + +alter table document drop foreign key fk_document_organisation_id; +drop index ix_document_organisation_id on document; + +alter table document_draft drop foreign key fk_document_draft_organisation_id; +drop index ix_document_draft_organisation_id on document_draft; + +alter table document_media drop foreign key fk_document_media_document_id; +drop index ix_document_media_document_id on document_media; + +alter table document_media_draft drop foreign key fk_document_media_draft_document_id; +drop index ix_document_media_draft_document_id on document_media_draft; + +alter table ebasic_json_map_detail drop foreign key fk_ebasic_json_map_detail_owner_id; +drop index ix_ebasic_json_map_detail_owner_id on ebasic_json_map_detail; + +alter table ebasic_no_sdchild drop foreign key fk_ebasic_no_sdchild_owner_id; +drop index ix_ebasic_no_sdchild_owner_id on ebasic_no_sdchild; + +alter table ebasic_sdchild drop foreign key fk_ebasic_sdchild_owner_id; +drop index ix_ebasic_sdchild_owner_id on ebasic_sdchild; + alter table eemb_inner drop foreign key fk_eemb_inner_outer_id; drop index ix_eemb_inner_outer_id on eemb_inner; @@ -74,12 +159,68 @@ drop index ix_eopt_one_a_b_id on eopt_one_a; alter table eopt_one_b drop foreign key fk_eopt_one_b_c_id; drop index ix_eopt_one_b_c_id on eopt_one_b; +alter table esoft_del_book drop foreign key fk_esoft_del_book_lend_by_id; +drop index ix_esoft_del_book_lend_by_id on esoft_del_book; + +alter table esoft_del_book_esoft_del_user drop foreign key fk_esoft_del_book_esoft_del_user_esoft_del_book; +drop index ix_esoft_del_book_esoft_del_user_esoft_del_book on esoft_del_book_esoft_del_user; + +alter table esoft_del_book_esoft_del_user drop foreign key fk_esoft_del_book_esoft_del_user_esoft_del_user; +drop index ix_esoft_del_book_esoft_del_user_esoft_del_user on esoft_del_book_esoft_del_user; + +alter table esoft_del_down drop foreign key fk_esoft_del_down_esoft_del_mid_id; +drop index ix_esoft_del_down_esoft_del_mid_id on esoft_del_down; + +alter table esoft_del_mid drop foreign key fk_esoft_del_mid_top_id; +drop index ix_esoft_del_mid_top_id on esoft_del_mid; + +alter table esoft_del_mid drop foreign key fk_esoft_del_mid_up_id; +drop index ix_esoft_del_mid_up_id on esoft_del_mid; + +alter table esoft_del_one_a drop foreign key fk_esoft_del_one_a_oneb_id; + +alter table esoft_del_role_esoft_del_user drop foreign key fk_esoft_del_role_esoft_del_user_esoft_del_role; +drop index ix_esoft_del_role_esoft_del_user_esoft_del_role on esoft_del_role_esoft_del_user; + +alter table esoft_del_role_esoft_del_user drop foreign key fk_esoft_del_role_esoft_del_user_esoft_del_user; +drop index ix_esoft_del_role_esoft_del_user_esoft_del_user on esoft_del_role_esoft_del_user; + +alter table esoft_del_user_esoft_del_role drop foreign key fk_esoft_del_user_esoft_del_role_esoft_del_user; +drop index ix_esoft_del_user_esoft_del_role_esoft_del_user on esoft_del_user_esoft_del_role; + +alter table esoft_del_user_esoft_del_role drop foreign key fk_esoft_del_user_esoft_del_role_esoft_del_role; +drop index ix_esoft_del_user_esoft_del_role_esoft_del_role on esoft_del_user_esoft_del_role; + +alter table rawinherit_uncle drop foreign key fk_rawinherit_uncle_parent_id; +drop index ix_rawinherit_uncle_parent_id on rawinherit_uncle; + alter table evanilla_collection_detail drop foreign key fk_evanilla_collection_detail_evanilla_collection_id; drop index ix_evanilla_collection_detail_evanilla_collection_id on evanilla_collection_detail; alter table td_child drop foreign key fk_td_child_parent_id; drop index ix_td_child_parent_id on td_child; +alter table empl drop foreign key fk_empl_default_address_id; +drop index ix_empl_default_address_id on empl; + +alter table grand_parent_person drop foreign key fk_grand_parent_person_some_bean_id; +drop index ix_grand_parent_person_some_bean_id on grand_parent_person; + +alter table survey_group drop foreign key fk_survey_group_categoryobjectid; +drop index ix_survey_group_categoryobjectid on survey_group; + +alter table hx_link_doc drop foreign key fk_hx_link_doc_hx_link; +drop index ix_hx_link_doc_hx_link on hx_link_doc; + +alter table hx_link_doc drop foreign key fk_hx_link_doc_he_doc; +drop index ix_hx_link_doc_he_doc on hx_link_doc; + +alter table hi_link_doc drop foreign key fk_hi_link_doc_hi_link; +drop index ix_hi_link_doc_hi_link on hi_link_doc; + +alter table hi_link_doc drop foreign key fk_hi_link_doc_hi_doc; +drop index ix_hi_link_doc_hi_doc on hi_link_doc; + alter table imrelated drop foreign key fk_imrelated_owner_id; drop index ix_imrelated_owner_id on imrelated; @@ -93,35 +234,48 @@ alter table inner_report drop foreign key fk_inner_report_forecast_id; alter table drel_invoice drop foreign key fk_drel_invoice_booking; drop index ix_drel_invoice_booking on drel_invoice; -alter table item drop foreign key fk_item_type; -drop index ix_item_customer_type on item; +alter table item drop foreign key fk_item_etype; +drop index ix_item_etype on item; -alter table item drop foreign key fk_item_region; -drop index ix_item_customer_region on item; +alter table item drop foreign key fk_item_eregion; +drop index ix_item_eregion on item; + +alter table trainer_monkey drop foreign key fk_trainer_monkey_trainer; + +alter table trainer_monkey drop foreign key fk_trainer_monkey_monkey; + +alter table troop_monkey drop foreign key fk_troop_monkey_troop; + +alter table troop_monkey drop foreign key fk_troop_monkey_monkey; + +alter table l2_cldf_reset_bean_child drop foreign key fk_l2_cldf_reset_bean_child_parent_id; +drop index ix_l2_cldf_reset_bean_child_parent_id on l2_cldf_reset_bean_child; alter table level1_level4 drop foreign key fk_level1_level4_level1; -drop index ix_level1_level4_level1_id on level1_level4; +drop index ix_level1_level4_level1 on level1_level4; alter table level1_level4 drop foreign key fk_level1_level4_level4; -drop index ix_level1_level4_level4_id on level1_level4; +drop index ix_level1_level4_level4 on level1_level4; alter table level1_level2 drop foreign key fk_level1_level2_level1; -drop index ix_level1_level2_level1_id on level1_level2; +drop index ix_level1_level2_level1 on level1_level2; alter table level1_level2 drop foreign key fk_level1_level2_level2; -drop index ix_level1_level2_level2_id on level1_level2; +drop index ix_level1_level2_level2 on level1_level2; alter table level2_level3 drop foreign key fk_level2_level3_level2; -drop index ix_level2_level3_level2_id on level2_level3; +drop index ix_level2_level3_level2 on level2_level3; alter table level2_level3 drop foreign key fk_level2_level3_level3; -drop index ix_level2_level3_level3_id on level2_level3; +drop index ix_level2_level3_level3 on level2_level3; + +alter table link drop foreign key fk_link_id; alter table la_attr_value_attribute drop foreign key fk_la_attr_value_attribute_la_attr_value; -drop index ix_la_attr_value_attribute_la_attr_value_id on la_attr_value_attribute; +drop index ix_la_attr_value_attribute_la_attr_value on la_attr_value_attribute; alter table la_attr_value_attribute drop foreign key fk_la_attr_value_attribute_attribute; -drop index ix_la_attr_value_attribute_attribute_id on la_attr_value_attribute; +drop index ix_la_attr_value_attribute_attribute on la_attr_value_attribute; alter table mprinter drop foreign key fk_mprinter_current_state_id; drop index ix_mprinter_current_state_id on mprinter; @@ -141,14 +295,26 @@ alter table mprofile drop foreign key fk_mprofile_picture_id; drop index ix_mprofile_picture_id on mprofile; alter table mrole_muser drop foreign key fk_mrole_muser_mrole; -drop index ix_mrole_muser_mrole_roleid on mrole_muser; +drop index ix_mrole_muser_mrole on mrole_muser; alter table mrole_muser drop foreign key fk_mrole_muser_muser; -drop index ix_mrole_muser_muser_userid on mrole_muser; +drop index ix_mrole_muser_muser on mrole_muser; alter table muser drop foreign key fk_muser_user_type_id; drop index ix_muser_user_type_id on muser; +alter table mail_user_inbox drop foreign key fk_mail_user_inbox_mail_user; +drop index ix_mail_user_inbox_mail_user on mail_user_inbox; + +alter table mail_user_inbox drop foreign key fk_mail_user_inbox_mail_box; +drop index ix_mail_user_inbox_mail_box on mail_user_inbox; + +alter table mail_user_outbox drop foreign key fk_mail_user_outbox_mail_user; +drop index ix_mail_user_outbox_mail_user on mail_user_outbox; + +alter table mail_user_outbox drop foreign key fk_mail_user_outbox_mail_box; +drop index ix_mail_user_outbox_mail_box on mail_user_outbox; + alter table c_message drop foreign key fk_c_message_conversation_id; drop index ix_c_message_conversation_id on c_message; @@ -156,22 +322,49 @@ alter table c_message drop foreign key fk_c_message_user_id; drop index ix_c_message_user_id on c_message; alter table mnoc_user_mnoc_role drop foreign key fk_mnoc_user_mnoc_role_mnoc_user; -drop index ix_mnoc_user_mnoc_role_mnoc_user_user_id on mnoc_user_mnoc_role; +drop index ix_mnoc_user_mnoc_role_mnoc_user on mnoc_user_mnoc_role; alter table mnoc_user_mnoc_role drop foreign key fk_mnoc_user_mnoc_role_mnoc_role; -drop index ix_mnoc_user_mnoc_role_mnoc_role_role_id on mnoc_user_mnoc_role; +drop index ix_mnoc_user_mnoc_role_mnoc_role on mnoc_user_mnoc_role; + +alter table mny_b drop foreign key fk_mny_b_a_id; +drop index ix_mny_b_a_id on mny_b; + +alter table mny_b_mny_c drop foreign key fk_mny_b_mny_c_mny_b; +drop index ix_mny_b_mny_c_mny_b on mny_b_mny_c; + +alter table mny_b_mny_c drop foreign key fk_mny_b_mny_c_mny_c; +drop index ix_mny_b_mny_c_mny_c on mny_b_mny_c; + +alter table subtopics drop foreign key fk_subtopics_mny_topic_1; +drop index ix_subtopics_mny_topic_1 on subtopics; + +alter table subtopics drop foreign key fk_subtopics_mny_topic_2; +drop index ix_subtopics_mny_topic_2 on subtopics; alter table mp_role drop foreign key fk_mp_role_mp_user_id; drop index ix_mp_role_mp_user_id on mp_role; +alter table ms_many_a_many_b drop foreign key fk_ms_many_a_many_b_ms_many_a; +drop index ix_ms_many_a_many_b_ms_many_a on ms_many_a_many_b; + +alter table ms_many_a_many_b drop foreign key fk_ms_many_a_many_b_ms_many_b; +drop index ix_ms_many_a_many_b_ms_many_b on ms_many_a_many_b; + +alter table ms_many_b_many_a drop foreign key fk_ms_many_b_many_a_ms_many_b; +drop index ix_ms_many_b_many_a_ms_many_b on ms_many_b_many_a; + +alter table ms_many_b_many_a drop foreign key fk_ms_many_b_many_a_ms_many_a; +drop index ix_ms_many_b_many_a_ms_many_a on ms_many_b_many_a; + alter table my_lob_size_join_many drop foreign key fk_my_lob_size_join_many_parent_id; drop index ix_my_lob_size_join_many_parent_id on my_lob_size_join_many; alter table o_cached_bean_country drop foreign key fk_o_cached_bean_country_o_cached_bean; -drop index ix_o_cached_bean_country_o_cached_bean_id on o_cached_bean_country; +drop index ix_o_cached_bean_country_o_cached_bean on o_cached_bean_country; alter table o_cached_bean_country drop foreign key fk_o_cached_bean_country_o_country; -drop index ix_o_cached_bean_country_o_country_code on o_cached_bean_country; +drop index ix_o_cached_bean_country_o_country on o_cached_bean_country; alter table o_cached_bean_child drop foreign key fk_o_cached_bean_child_cached_bean_id; drop index ix_o_cached_bean_child_cached_bean_id on o_cached_bean_child; @@ -180,6 +373,11 @@ alter table oengine drop foreign key fk_oengine_car_id; alter table ogear_box drop foreign key fk_ogear_box_car_id; +alter table oroad_show_msg drop foreign key fk_oroad_show_msg_company_id; + +alter table om_ordered_detail drop foreign key fk_om_ordered_detail_master_id; +drop index ix_om_ordered_detail_master_id on om_ordered_detail; + alter table o_order drop foreign key fk_o_order_kcustomer_id; drop index ix_o_order_kcustomer_id on o_order; @@ -195,8 +393,23 @@ drop index ix_s_order_items_order_uuid on s_order_items; alter table or_order_ship drop foreign key fk_or_order_ship_order_id; drop index ix_or_order_ship_order_id on or_order_ship; +alter table oto_bchild drop foreign key fk_oto_bchild_master_id; + alter table oto_child drop foreign key fk_oto_child_master_id; +alter table oto_cust_address drop foreign key fk_oto_cust_address_customer_cid; + +alter table oto_prime_extra drop foreign key fk_oto_prime_extra_eid; + +alter table oto_th_many drop foreign key fk_oto_th_many_oto_th_top_id; +drop index ix_oto_th_many_oto_th_top_id on oto_th_many; + +alter table oto_th_one drop foreign key fk_oto_th_one_many_id; + +alter table oto_ubprime_extra drop foreign key fk_oto_ubprime_extra_eid; + +alter table oto_uprime_extra drop foreign key fk_oto_uprime_extra_eid; + alter table pfile drop foreign key fk_pfile_file_content_id; alter table pfile drop foreign key fk_pfile_file_content2_id; @@ -209,10 +422,16 @@ drop index ix_pallet_location_zone_sid on pallet_location; alter table parcel_location drop foreign key fk_parcel_location_parcelid; alter table rawinherit_parent_rawinherit_data drop foreign key fk_rawinherit_parent_rawinherit_data_rawinherit_parent; -drop index ix_rawinherit_parent_rawinherit_data_rawinherit_parent_id on rawinherit_parent_rawinherit_data; +drop index ix_rawinherit_parent_rawinherit_data_rawinherit_parent on rawinherit_parent_rawinherit_data; alter table rawinherit_parent_rawinherit_data drop foreign key fk_rawinherit_parent_rawinherit_data_rawinherit_data; -drop index ix_rawinherit_parent_rawinherit_data_rawinherit_data_id on rawinherit_parent_rawinherit_data; +drop index ix_rawinherit_parent_rawinherit_data_rawinherit_data on rawinherit_parent_rawinherit_data; + +alter table parent_person drop foreign key fk_parent_person_some_bean_id; +drop index ix_parent_person_some_bean_id on parent_person; + +alter table parent_person drop foreign key fk_parent_person_parent_identifier; +drop index ix_parent_person_parent_identifier on parent_person; alter table c_participation drop foreign key fk_c_participation_conversation_id; drop index ix_c_participation_conversation_id on c_participation; @@ -229,13 +448,16 @@ alter table phones drop foreign key fk_phones_person_id; drop index ix_phones_person_id on phones; alter table pp_to_ww drop foreign key fk_pp_to_ww_pp; -drop index ix_pp_to_ww_pp_id on pp_to_ww; +drop index ix_pp_to_ww_pp on pp_to_ww; alter table pp_to_ww drop foreign key fk_pp_to_ww_wview; -drop index ix_pp_to_ww_ww_id on pp_to_ww; +drop index ix_pp_to_ww_wview on pp_to_ww; -alter table r_orders drop foreign key fk_r_orders_rcustomer; -drop index ix_r_orders_company_customername on r_orders; +alter table question drop foreign key fk_question_groupobjectid; +drop index ix_question_groupobjectid on question; + +alter table r_orders drop foreign key fk_r_orders_customer; +drop index ix_r_orders_customer on r_orders; alter table resourcefile drop foreign key fk_resourcefile_parentresourcefileid; drop index ix_resourcefile_parentresourcefileid on resourcefile; @@ -244,10 +466,10 @@ alter table mt_role drop foreign key fk_mt_role_tenant_id; drop index ix_mt_role_tenant_id on mt_role; alter table mt_role_permission drop foreign key fk_mt_role_permission_mt_role; -drop index ix_mt_role_permission_mt_role_id on mt_role_permission; +drop index ix_mt_role_permission_mt_role on mt_role_permission; alter table mt_role_permission drop foreign key fk_mt_role_permission_mt_permission; -drop index ix_mt_role_permission_mt_permission_id on mt_role_permission; +drop index ix_mt_role_permission_mt_permission on mt_role_permission; alter table f_second drop foreign key fk_f_second_first; @@ -269,6 +491,11 @@ drop index ix_stockforecast_inner_report_id on stockforecast; alter table sub_section drop foreign key fk_sub_section_section_id; drop index ix_sub_section_section_id on sub_section; +alter table tevent_many drop foreign key fk_tevent_many_event_id; +drop index ix_tevent_many_event_id on tevent_many; + +alter table tevent_one drop foreign key fk_tevent_one_event_id; + alter table t_detail_with_other_namexxxyy drop foreign key fk_t_detail_with_other_namexxxyy_master_id; drop index ix_t_detail_with_other_namexxxyy_master_id on t_detail_with_other_namexxxyy; @@ -306,12 +533,12 @@ drop index ix_em_user_role_user_id on em_user_role; alter table em_user_role drop foreign key fk_em_user_role_role_id; drop index ix_em_user_role_role_id on em_user_role; -alter table vehicle drop foreign key fk_vehicle_truck_ref_id; -drop index ix_vehicle_truck_ref_id on vehicle; - alter table vehicle drop foreign key fk_vehicle_car_ref_id; drop index ix_vehicle_car_ref_id on vehicle; +alter table vehicle drop foreign key fk_vehicle_truck_ref_id; +drop index ix_vehicle_truck_ref_id on vehicle; + alter table vehicle_driver drop foreign key fk_vehicle_driver_vehicle_id; drop index ix_vehicle_driver_vehicle_id on vehicle_driver; @@ -322,10 +549,10 @@ alter table warehouses drop foreign key fk_warehouses_officezoneid; drop index ix_warehouses_officezoneid on warehouses; alter table warehousesshippingzones drop foreign key fk_warehousesshippingzones_warehouses; -drop index ix_warehousesshippingzones_warehouseid on warehousesshippingzones; +drop index ix_warehousesshippingzones_warehouses on warehousesshippingzones; alter table warehousesshippingzones drop foreign key fk_warehousesshippingzones_zones; -drop index ix_warehousesshippingzones_shippingzoneid on warehousesshippingzones; +drop index ix_warehousesshippingzones_zones on warehousesshippingzones; alter table sa_wheel drop foreign key fk_sa_wheel_tire; drop index ix_sa_wheel_tire on sa_wheel; @@ -333,6 +560,12 @@ drop index ix_sa_wheel_tire on sa_wheel; alter table sa_wheel drop foreign key fk_sa_wheel_car; drop index ix_sa_wheel_car on sa_wheel; +alter table g_who_props_otm drop foreign key fk_g_who_props_otm_who_created_id; +drop index ix_g_who_props_otm_who_created_id on g_who_props_otm; + +alter table g_who_props_otm drop foreign key fk_g_who_props_otm_who_modified_id; +drop index ix_g_who_props_otm_who_modified_id on g_who_props_otm; + alter table with_zero drop foreign key fk_with_zero_parent_id; drop index ix_with_zero_parent_id on with_zero; @@ -342,11 +575,15 @@ drop table if exists bar; drop table if exists oto_account; -drop table if exists o_address; +drop table if exists addr; drop table if exists address; -drop table if exists animals; +drop table if exists o_address; + +drop table if exists album; + +drop table if exists animal; drop table if exists animal_shelter; @@ -364,6 +601,16 @@ drop table if exists bbookmark_user; drop table if exists bsimple_with_gen; +drop table if exists bsite; + +drop table if exists bsite_user; + +drop table if exists bsite_user_b; + +drop table if exists bsite_user_c; + +drop table if exists buser; + drop table if exists bwith_qident; drop table if exists basic_joda_entity; @@ -372,6 +619,8 @@ drop table if exists bean_with_time_zone; drop table if exists drel_booking; +drop table if exists cinh_root; + drop table if exists ckey_assoc; drop table if exists ckey_detail; @@ -390,6 +639,12 @@ drop table if exists sp_car_car_wheels; drop table if exists car_accessory; +drop table if exists car_fuse; + +drop table if exists category; + +drop table if exists child_person; + drop table if exists configuration; drop table if exists configurations; @@ -404,16 +659,62 @@ drop table if exists c_conversation; drop table if exists o_country; +drop table if exists cover; + drop table if exists o_customer; +drop table if exists dcredit; + +drop table if exists dcredit_drol; + drop table if exists dexh_entity; drop table if exists dperson; +drop table if exists drol; + +drop table if exists drot; + +drop table if exists drot_drol; + drop table if exists rawinherit_data; +drop table if exists dfk_cascade; + +drop table if exists dfk_cascade_one; + +drop table if exists dfk_none; + +drop table if exists dfk_none_via_join; + +drop table if exists dfk_one; + +drop table if exists dfk_set_null; + +drop table if exists doc; + +drop table if exists doc_link; + +drop table if exists doc_link_draft; + +drop table if exists doc_draft; + +drop table if exists document; + +drop table if exists document_draft; + +drop table if exists document_media; + +drop table if exists document_media_draft; + +drop table if exists earray_bean; + +drop table if exists earray_set_bean; + drop table if exists e_basic; +drop table if exists ebasic_change_log; + drop table if exists ebasic_clob; drop table if exists ebasic_clob_fetch_eager; @@ -426,12 +727,20 @@ drop table if exists e_basicenc_bin; drop table if exists e_basic_enum_id; +drop table if exists e_basic_eni; + +drop table if exists ebasic_hstore; + +drop table if exists ebasic_json_list; + drop table if exists ebasic_json_map; drop table if exists ebasic_json_map_blob; drop table if exists ebasic_json_map_clob; +drop table if exists ebasic_json_map_detail; + drop table if exists ebasic_json_map_json_b; drop table if exists ebasic_json_map_varchar; @@ -444,14 +753,26 @@ drop table if exists ebasic_json_node_json_b; drop table if exists ebasic_json_node_varchar; +drop table if exists ebasic_json_unmapped; + drop table if exists e_basic_ndc; +drop table if exists ebasic_no_sdchild; + +drop table if exists ebasic_sdchild; + +drop table if exists ebasic_soft_delete; + drop table if exists e_basicver; drop table if exists e_basic_withlife; drop table if exists e_basicverucon; +drop table if exists e_col_ab; + +drop table if exists ecustom_id; + drop table if exists eemb_inner; drop table if exists eemb_outer; @@ -474,12 +795,42 @@ drop table if exists eopt_one_c; drop table if exists eperson; +drop table if exists e_person_online; + drop table if exists esimple; +drop table if exists esoft_del_book; + +drop table if exists esoft_del_book_esoft_del_user; + +drop table if exists esoft_del_down; + +drop table if exists esoft_del_mid; + +drop table if exists esoft_del_one_a; + +drop table if exists esoft_del_one_b; + +drop table if exists esoft_del_role; + +drop table if exists esoft_del_role_esoft_del_user; + +drop table if exists esoft_del_top; + +drop table if exists esoft_del_up; + +drop table if exists esoft_del_user; + +drop table if exists esoft_del_user_esoft_del_role; + +drop table if exists esome_convert_type; + drop table if exists esome_type; drop table if exists etrans_many; +drop table if exists rawinherit_uncle; + drop table if exists evanilla_collection; drop table if exists evanilla_collection_detail; @@ -492,6 +843,8 @@ drop table if exists td_child; drop table if exists td_parent; +drop table if exists empl; + drop table if exists feature_desc; drop table if exists f_first; @@ -504,8 +857,45 @@ drop table if exists gen_key_sequence; drop table if exists gen_key_table; +drop table if exists grand_parent_person; + +drop table if exists survey_group; + drop table if exists c_group; +drop table if exists he_doc; + +drop trigger hx_link_history_upd; +drop trigger hx_link_history_del; +drop view hx_link_with_history; +alter table hx_link drop column sys_period_start; +alter table hx_link drop column sys_period_end; +drop table hx_link_history; + +drop table if exists hx_link; + +drop table if exists hx_link_doc; + +drop table if exists hi_doc; + +drop trigger hi_link_history_upd; +drop trigger hi_link_history_del; +drop view hi_link_with_history; +alter table hi_link drop column sys_period_start; +alter table hi_link drop column sys_period_end; +drop table hi_link_history; + +drop table if exists hi_link; + +drop trigger hi_link_doc_history_upd; +drop trigger hi_link_doc_history_del; +drop view hi_link_doc_with_history; +alter table hi_link_doc drop column sys_period_start; +alter table hi_link_doc drop column sys_period_end; +drop table hi_link_doc_history; + +drop table if exists hi_link_doc; + drop table if exists imrelated; drop table if exists imroot; @@ -524,6 +914,20 @@ drop table if exists drel_invoice; drop table if exists item; +drop table if exists monkey; + +drop table if exists trainer; + +drop table if exists trainer_monkey; + +drop table if exists troop; + +drop table if exists troop_monkey; + +drop table if exists l2_cldf_reset_bean; + +drop table if exists l2_cldf_reset_bean_child; + drop table if exists level1; drop table if exists level1_level4; @@ -538,6 +942,17 @@ drop table if exists level3; drop table if exists level4; +drop trigger link_history_upd; +drop trigger link_history_del; +drop view link_with_history; +alter table link drop column sys_period_start; +alter table link drop column sys_period_end; +drop table link_history; + +drop table if exists link; + +drop table if exists link_draft; + drop table if exists la_attr_value; drop table if exists la_attr_value_attribute; @@ -564,6 +979,14 @@ drop table if exists muser; drop table if exists muser_type; +drop table if exists mail_box; + +drop table if exists mail_user; + +drop table if exists mail_user_inbox; + +drop table if exists mail_user_outbox; + drop table if exists map_super_actual; drop table if exists c_message; @@ -574,10 +997,30 @@ drop table if exists mnoc_user; drop table if exists mnoc_user_mnoc_role; +drop table if exists mny_a; + +drop table if exists mny_b; + +drop table if exists mny_b_mny_c; + +drop table if exists mny_c; + +drop table if exists mny_topic; + +drop table if exists subtopics; + drop table if exists mp_role; drop table if exists mp_user; +drop table if exists ms_many_a; + +drop table if exists ms_many_a_many_b; + +drop table if exists ms_many_b; + +drop table if exists ms_many_b_many_a; + drop table if exists my_lob_size; drop table if exists my_lob_size_join_many; @@ -590,12 +1033,24 @@ drop table if exists o_cached_bean_country; drop table if exists o_cached_bean_child; +drop table if exists o_cached_natkey; + +drop table if exists o_cached_natkey3; + drop table if exists ocar; +drop table if exists ocompany; + drop table if exists oengine; drop table if exists ogear_box; +drop table if exists oroad_show_msg; + +drop table if exists om_ordered_detail; + +drop table if exists om_ordered_master; + drop table if exists o_order; drop table if exists o_order_detail; @@ -606,10 +1061,38 @@ drop table if exists s_order_items; drop table if exists or_order_ship; +drop table if exists organisation; + +drop table if exists oto_bchild; + +drop table if exists oto_bmaster; + drop table if exists oto_child; +drop table if exists oto_cust; + +drop table if exists oto_cust_address; + drop table if exists oto_master; +drop table if exists oto_prime; + +drop table if exists oto_prime_extra; + +drop table if exists oto_th_many; + +drop table if exists oto_th_one; + +drop table if exists oto_th_top; + +drop table if exists oto_ubprime; + +drop table if exists oto_ubprime_extra; + +drop table if exists oto_uprime; + +drop table if exists oto_uprime_extra; + drop table if exists pfile; drop table if exists pfile_content; @@ -626,6 +1109,8 @@ drop table if exists rawinherit_parent; drop table if exists rawinherit_parent_rawinherit_data; +drop table if exists parent_person; + drop table if exists c_participation; drop table if exists mt_permission; @@ -640,12 +1125,16 @@ drop table if exists person; drop table if exists phones; +drop table if exists primary_revision; + drop table if exists o_product; drop table if exists pp; drop table if exists pp_to_ww; +drop table if exists question; + drop table if exists rcustomer; drop table if exists r_orders; @@ -654,12 +1143,12 @@ drop table if exists region; drop table if exists resourcefile; +drop table if exists em_role; + drop table if exists mt_role; drop table if exists mt_role_permission; -drop table if exists em_role; - drop table if exists f_second; drop table if exists section; @@ -684,10 +1173,18 @@ drop table if exists sub_section; drop table if exists sub_type; +drop table if exists survey; + drop table if exists tbytes_only; drop table if exists tcar; +drop table if exists tevent; + +drop table if exists tevent_many; + +drop table if exists tevent_one; + drop table if exists tint_root; drop table if exists tjoda_entity; @@ -712,16 +1209,20 @@ drop table if exists twith_pre_insert; drop table if exists mt_tenant; -drop table if exists sa_tire; +drop table if exists test_annotation_base_entity; drop table if exists tire; +drop table if exists sa_tire; + drop table if exists trip; drop table if exists truck_ref; drop table if exists type; +drop table if exists tz_bean; + drop table if exists ut_detail; drop table if exists ut_master; @@ -730,11 +1231,20 @@ drop table if exists uuone; drop table if exists uutwo; -drop table if exists em_user; +drop trigger c_user_history_upd; +drop trigger c_user_history_del; +drop view c_user_with_history; +alter table c_user drop column sys_period_start; +alter table c_user drop column sys_period_end; +drop table c_user_history; + +drop table if exists c_user; drop table if exists tx_user; -drop table if exists c_user; +drop table if exists g_user; + +drop table if exists em_user; drop table if exists oto_user; @@ -750,9 +1260,11 @@ drop table if exists warehousesshippingzones; drop table if exists sa_wheel; +drop table if exists wheel; + drop table if exists sp_car_wheel; -drop table if exists wheel; +drop table if exists g_who_props_otm; drop table if exists with_zero; @@ -762,3 +1274,5 @@ drop table if exists wview; drop table if exists zones; +drop index ix_contact_last_name_first_name on contact; +drop index ix_e_basic_name on e_basic; diff --git a/src/test/ddl-review/oracle-create-all.sql b/src/test/ddl-review/oracle-create-all.sql index 5dc24914c..b5eee44f8 100644 --- a/src/test/ddl-review/oracle-create-all.sql +++ b/src/test/ddl-review/oracle-create-all.sql @@ -24,6 +24,26 @@ create table oto_account ( ); create sequence oto_account_seq; +create table addr ( + id number(19) not null, + employee_id number(19), + name varchar2(255), + address_line1 varchar2(255), + address_line2 varchar2(255), + city varchar2(255), + version number(19) not null, + constraint pk_addr primary key (id) +); +create sequence addr_seq; + +create table address ( + oid number(19) not null, + street varchar2(255), + version number(10) not null, + constraint pk_address primary key (oid) +); +create sequence address_seq; + create table o_address ( id number(5) not null, line_1 varchar2(100), @@ -36,25 +56,30 @@ create table o_address ( ); create sequence o_address_seq; -create table address ( - oid number(19) not null, - street varchar2(255), - version number(10) not null, - constraint pk_address primary key (oid) +create table album ( + id number(19) not null, + name varchar2(255), + cover_id number(19), + deleted number(1) default 0 not null, + created_at timestamp not null, + last_update timestamp not null, + constraint uq_album_cover_id unique (cover_id), + constraint pk_album primary key (id) ); -create sequence address_seq; +create sequence album_seq; -create table animals ( - species varchar2(31) not null, +create table animal ( + species varchar2(255) not null, id number(19) not null, shelter_id number(19), version number(19) not null, name varchar2(255), registration_number varchar2(255), date_of_birth date, - constraint pk_animals primary key (id) + dog_size varchar2(255), + constraint pk_animal primary key (id) ); -create sequence animals_seq; +create sequence animal_seq; create table animal_shelter ( id number(19) not null, @@ -128,9 +153,45 @@ create table bsimple_with_gen ( ); create sequence bsimple_with_gen_seq; +create table bsite ( + id varchar2(40) not null, + name varchar2(255), + constraint pk_bsite primary key (id) +); + +create table bsite_user ( + site_id varchar2(40) not null, + user_id varchar2(40) not null, + access_level number(10), + constraint ck_bsite_user_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user primary key (site_id,user_id) +); + +create table bsite_user_b ( + site varchar2(40) not null, + usr varchar2(40) not null, + access_level number(10), + constraint ck_bsite_user_b_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_b primary key (site,usr) +); + +create table bsite_user_c ( + site_uid varchar2(40) not null, + user_uid varchar2(40) not null, + access_level number(10), + constraint ck_bsite_user_c_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_c primary key (site_uid,user_uid) +); + +create table buser ( + id varchar2(40) not null, + name varchar2(255), + constraint pk_buser primary key (id) +); + create table bwith_qident ( id number(10) not null, - "Name" varchar2(255), + "Name" varchar2(191), last_updated timestamp not null, constraint uq_bwith_qident_name unique ("Name"), constraint pk_bwith_qident primary key (id) @@ -157,15 +218,31 @@ create sequence bean_with_time_zone_seq; create table drel_booking ( id number(19) not null, + booking_uid number(19), agent_invoice number(19), client_invoice number(19), version number(10) not null, + constraint uq_drel_booking_booking_uid unique (booking_uid), constraint uq_drel_booking_agent_invoice unique (agent_invoice), - constraint uq_drel_booking_client_invo_2 unique (client_invoice), + constraint uq_drl_bkng_clnt_nvc unique (client_invoice), constraint pk_drel_booking primary key (id) ); create sequence drel_booking_seq; +create table cinh_root ( + dtype varchar2(3) not null, + id number(10) not null, + license_number varchar2(255), + cretime timestamp not null, + updtime timestamp not null, + version number(19) not null, + driver varchar2(255), + notes varchar2(255), + action varchar2(255), + constraint pk_cinh_root primary key (id) +); +create sequence cinh_root_seq; + create table ckey_assoc ( id number(10) not null, assoc_one varchar2(255), @@ -193,7 +270,7 @@ create table ckey_parent ( create table calculation_result ( id number(10) not null, - charge number(19,4), + charge number(19,4) not null, product_configuration_id number(10), group_configuration_id number(10), constraint pk_calculation_result primary key (id) @@ -231,6 +308,7 @@ create table sp_car_car_wheels ( create table car_accessory ( id number(10) not null, name varchar2(255), + fuse_id number(19) not null, car_id number(10), cretime timestamp not null, updtime timestamp not null, @@ -239,8 +317,36 @@ create table car_accessory ( ); create sequence car_accessory_seq; +create table car_fuse ( + id number(19) not null, + location_code varchar2(255), + constraint pk_car_fuse primary key (id) +); +create sequence car_fuse_seq; + +create table category ( + id number(19) not null, + name varchar2(255), + surveyobjectid number(19), + sequence_number number(10) not null, + constraint pk_category primary key (id) +); +create sequence category_seq; + +create table child_person ( + identifier number(10) not null, + name varchar2(255), + age number(10), + some_bean_id number(10), + parent_identifier number(10), + family_name varchar2(255), + address varchar2(255), + constraint pk_child_person primary key (identifier) +); +create sequence child_person_seq; + create table configuration ( - type varchar2(31) not null, + type varchar2(21) not null, id number(10) not null, name varchar2(255), configurations_id number(10), @@ -259,8 +365,8 @@ create sequence configurations_seq; create table contact ( id number(10) not null, - first_name varchar2(255), - last_name varchar2(255), + first_name varchar2(127), + last_name varchar2(127), phone varchar2(255), mobile varchar2(255), email varchar2(255), @@ -297,7 +403,7 @@ create sequence contact_note_seq; create table c_conversation ( id number(19) not null, title varchar2(255), - isopen number(1), + isopen number(1) default 0 not null, group_id number(19), version number(19) not null, when_created timestamp not null, @@ -312,6 +418,14 @@ create table o_country ( constraint pk_o_country primary key (code) ); +create table cover ( + id number(19) not null, + s3url varchar2(255), + deleted number(1) default 0 not null, + constraint pk_cover primary key (id) +); +create sequence cover_seq; + create table o_customer ( id number(10) not null, status varchar2(1), @@ -323,16 +437,31 @@ create table o_customer ( cretime timestamp not null, updtime timestamp not null, version number(19) not null, - constraint ck_o_customer_status check (status in ('N','A','I')), + constraint ck_o_customer_status check ( status in ('N','A','I')), constraint pk_o_customer primary key (id) ); +comment on table o_customer is 'Holds external customers'; +comment on column o_customer.status is 'status of the customer'; +comment on column o_customer.smallnote is 'Short notes regarding the customer'; +comment on column o_customer.anniversary is 'Join date of the customer'; create sequence o_customer_seq; +create table dcredit ( + id number(19) not null, + credit varchar2(255), + constraint pk_dcredit primary key (id) +); +create sequence dcredit_seq; + +create table dcredit_drol ( + dcredit_id number(19) not null, + drol_id number(19) not null, + constraint pk_dcredit_drol primary key (dcredit_id,drol_id) +); + create table dexh_entity ( oid number(19) not null, - exhange_rate number(38), - exhange_cmoney_amount number(38), - exhange_cmoney_currency varchar2(3), + exhange varchar2(255), last_updated timestamp not null, constraint pk_dexh_entity primary key (oid) ); @@ -343,14 +472,30 @@ create table dperson ( first_name varchar2(255), last_name varchar2(255), salary number(38), - a_amt number(38), - a_curr varchar2(3), - i_start timestamp, - i_end timestamp, constraint pk_dperson primary key (id) ); create sequence dperson_seq; +create table drol ( + id number(19) not null, + name varchar2(255), + constraint pk_drol primary key (id) +); +create sequence drol_seq; + +create table drot ( + id number(19) not null, + name varchar2(255), + constraint pk_drot primary key (id) +); +create sequence drot_seq; + +create table drot_drol ( + drot_id number(19) not null, + drol_id number(19) not null, + constraint pk_drot_drol primary key (drot_id,drol_id) +); + create table rawinherit_data ( id number(19) not null, val number(10), @@ -358,17 +503,186 @@ create table rawinherit_data ( ); create sequence rawinherit_data_seq; +create table dfk_cascade ( + id number(19) not null, + name varchar2(255), + one_id number(19), + constraint pk_dfk_cascade primary key (id) +); +create sequence dfk_cascade_seq; + +create table dfk_cascade_one ( + id number(19) not null, + name varchar2(255), + constraint pk_dfk_cascade_one primary key (id) +); +create sequence dfk_cascade_one_seq; + +create table dfk_none ( + id number(19) not null, + name varchar2(255), + one_id number(19), + constraint pk_dfk_none primary key (id) +); +create sequence dfk_none_seq; + +create table dfk_none_via_join ( + id number(19) not null, + name varchar2(255), + one_id number(19), + constraint pk_dfk_none_via_join primary key (id) +); +create sequence dfk_none_via_join_seq; + +create table dfk_one ( + id number(19) not null, + name varchar2(255), + constraint pk_dfk_one primary key (id) +); +create sequence dfk_one_seq; + +create table dfk_set_null ( + id number(19) not null, + name varchar2(255), + one_id number(19), + constraint pk_dfk_set_null primary key (id) +); +create sequence dfk_set_null_seq; + +create table doc ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_doc primary key (id) +); +create sequence doc_seq; + +create table doc_link ( + doc_id number(19) not null, + link_id number(19) not null, + constraint pk_doc_link primary key (doc_id,link_id) +); + +create table doc_link_draft ( + doc_id number(19) not null, + link_id number(19) not null, + constraint pk_doc_link_draft primary key (doc_id,link_id) +); + +create table doc_draft ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_doc_draft primary key (id) +); +create sequence doc_draft_seq; + +create table document ( + id number(19) not null, + title varchar2(127), + body varchar2(255), + organisation_id number(19), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint uq_document_title unique (title), + constraint pk_document primary key (id) +); +create sequence document_seq; + +create table document_draft ( + id number(19) not null, + title varchar2(127), + body varchar2(255), + when_publish timestamp, + organisation_id number(19), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint uq_document_draft_title unique (title), + constraint pk_document_draft primary key (id) +); +create sequence document_draft_seq; + +create table document_media ( + id number(19) not null, + document_id number(19), + name varchar2(255), + description varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_document_media primary key (id) +); +create sequence document_media_seq; + +create table document_media_draft ( + id number(19) not null, + document_id number(19), + name varchar2(255), + description varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_document_media_draft primary key (id) +); +create sequence document_media_draft_seq; + +create table earray_bean ( + id number(19) not null, + name varchar2(255), + phone_numbers varchar(300), + uids varchar(1000), + other_ids varchar(1000), + doubs varchar(1000), + statuses varchar(1000), + status2 varchar(1000), + version number(19) not null, + constraint pk_earray_bean primary key (id) +); +create sequence earray_bean_seq; + +create table earray_set_bean ( + id number(19) not null, + name varchar2(255), + phone_numbers varchar(300), + uids varchar(1000), + other_ids varchar(1000), + doubs varchar(1000), + version number(19) not null, + constraint pk_earray_set_bean primary key (id) +); +create sequence earray_set_bean_seq; + create table e_basic ( id number(10) not null, status varchar2(1), - name varchar2(255), + name varchar2(127), description varchar2(255), some_date timestamp, - constraint ck_e_basic_status check (status in ('N','A','I')), + constraint ck_e_basic_status check ( status in ('N','A','I')), constraint pk_e_basic primary key (id) ); create sequence e_basic_seq; +create table ebasic_change_log ( + id number(19) not null, + name varchar2(20), + short_description varchar2(50), + long_description varchar2(100), + who_created varchar2(255) not null, + who_modified varchar2(255) not null, + when_created timestamp not null, + when_modified timestamp not null, + version number(19) not null, + constraint pk_ebasic_change_log primary key (id) +); +create sequence ebasic_change_log_seq; + create table ebasic_clob ( id number(19) not null, name varchar2(255), @@ -402,6 +716,7 @@ create table e_basicenc ( name varchar2(255), description raw(80), dob raw(20), + status raw(20), last_update timestamp, constraint pk_e_basicenc primary key (id) ); @@ -422,10 +737,44 @@ create table e_basic_enum_id ( status varchar2(1) not null, name varchar2(255), description varchar2(255), - constraint ck_e_basic_enum_id_status check (status in ('N','A','I')), + constraint ck_e_basic_enum_id_status check ( status in ('N','A','I')), constraint pk_e_basic_enum_id primary key (status) ); +create table e_basic_eni ( + id number(10) not null, + status number(10), + name varchar2(255), + description varchar2(255), + some_date timestamp, + constraint ck_e_basic_eni_status check ( status in (1,2,3)), + constraint pk_e_basic_eni primary key (id) +); +create sequence e_basic_eni_seq; + +create table ebasic_hstore ( + id number(19) not null, + name varchar2(255), + map varchar2(800), + version number(19) not null, + constraint pk_ebasic_hstore primary key (id) +); +create sequence ebasic_hstore_seq; + +create table ebasic_json_list ( + id number(19) not null, + name varchar2(255), + bean_set varchar2(700), + bean_list clob, + bean_map varchar2(700), + plain_bean varchar2(500), + flags varchar2(50), + tags varchar2(100), + version number(19) not null, + constraint pk_ebasic_json_list primary key (id) +); +create sequence ebasic_json_list_seq; + create table ebasic_json_map ( id number(19) not null, name varchar2(255), @@ -453,6 +802,16 @@ create table ebasic_json_map_clob ( ); create sequence ebasic_json_map_clob_seq; +create table ebasic_json_map_detail ( + id number(19) not null, + owner_id number(19), + name varchar2(255), + content clob, + version number(19) not null, + constraint pk_ebasic_json_map_detail primary key (id) +); +create sequence ebasic_json_map_detail_seq; + create table ebasic_json_map_json_b ( id number(19) not null, name varchar2(255), @@ -507,6 +866,14 @@ create table ebasic_json_node_varchar ( ); create sequence ebasic_json_node_varchar_seq; +create table ebasic_json_unmapped ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_ebasic_json_unmapped primary key (id) +); +create sequence ebasic_json_unmapped_seq; + create table e_basic_ndc ( id number(10) not null, name varchar2(255), @@ -514,6 +881,37 @@ create table e_basic_ndc ( ); create sequence e_basic_ndc_seq; +create table ebasic_no_sdchild ( + id number(19) not null, + owner_id number(19) not null, + child_name varchar2(255), + amount number(19) not null, + version number(19) not null, + constraint pk_ebasic_no_sdchild primary key (id) +); +create sequence ebasic_no_sdchild_seq; + +create table ebasic_sdchild ( + id number(19) not null, + owner_id number(19) not null, + child_name varchar2(255), + amount number(19) not null, + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_ebasic_sdchild primary key (id) +); +create sequence ebasic_sdchild_seq; + +create table ebasic_soft_delete ( + id number(19) not null, + name varchar2(255), + description varchar2(255), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_ebasic_soft_delete primary key (id) +); +create sequence ebasic_soft_delete_seq; + create table e_basicver ( id number(10) not null, name varchar2(255), @@ -527,6 +925,7 @@ create sequence e_basicver_seq; create table e_basic_withlife ( id number(19) not null, name varchar2(255), + deleted number(1) default 0 not null, version number(19) not null, constraint pk_e_basic_withlife primary key (id) ); @@ -534,16 +933,31 @@ create sequence e_basic_withlife_seq; create table e_basicverucon ( id number(10) not null, - name varchar2(255), - other varchar2(255), - other_one varchar2(255), + name varchar2(127), + other varchar2(127), + other_one varchar2(127), description varchar2(255), last_update timestamp not null, constraint uq_e_basicverucon_name unique (name), + constraint uq_e_bscvrcn_thr_thr_n unique (other,other_one), constraint pk_e_basicverucon primary key (id) ); create sequence e_basicverucon_seq; +create table e_col_ab ( + id number(19) not null, + column_a varchar2(255), + column_b varchar2(255), + constraint pk_e_col_ab primary key (id) +); +create sequence e_col_ab_seq; + +create table ecustom_id ( + id varchar2(127) not null, + name varchar2(255), + constraint pk_ecustom_id primary key (id) +); + create table eemb_inner ( id number(10) not null, nome_inner varchar2(255), @@ -577,6 +991,8 @@ create table egen_props ( odt_updated timestamp not null, zdt_created timestamp not null, zdt_updated timestamp not null, + instant_created timestamp not null, + instant_updated timestamp not null, long_created number(19) not null, long_updated number(19) not null, constraint pk_egen_props primary key (id) @@ -591,11 +1007,15 @@ create table einvoice ( ship_street varchar2(255), ship_suburb varchar2(255), ship_city varchar2(255), - street varchar2(255), - suburb varchar2(255), - city varchar2(255), + ship_status varchar2(3), + bill_street varchar2(255), + bill_suburb varchar2(255), + bill_city varchar2(255), + bill_status varchar2(3), version number(19) not null, - constraint ck_einvoice_state check (state in (0,1,2)), + constraint ck_einvoice_state check ( state in (0,1,2)), + constraint ck_einvoice_ship_status check ( ship_status in ('ONE','TWO')), + constraint ck_einvoice_bill_status check ( bill_status in ('ONE','TWO')), constraint pk_einvoice primary key (id) ); create sequence einvoice_seq; @@ -662,18 +1082,122 @@ create table eperson ( notes varchar2(255), street varchar2(255), suburb varchar2(255), - city varchar2(255), + addr_city varchar2(255), + addr_status varchar2(3), version number(19) not null, + constraint ck_eperson_addr_status check ( addr_status in ('ONE','TWO')), constraint pk_eperson primary key (id) ); create sequence eperson_seq; +create table e_person_online ( + id number(19) not null, + email varchar2(127), + online_status number(1) default 0 not null, + when_updated timestamp not null, + constraint uq_e_person_online_email unique (email), + constraint pk_e_person_online primary key (id) +); +create sequence e_person_online_seq; + create table esimple ( - usertypeid number(10) not null, + usertypeid number(10) generated always as identity not null, name varchar2(255), constraint pk_esimple primary key (usertypeid) ); -create sequence esimple_seq; + +create table esoft_del_book ( + id number(19) not null, + book_title varchar2(255), + lend_by_id number(19), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_book primary key (id) +); +create sequence esoft_del_book_seq; + +create table esoft_del_book_esoft_del_user ( + esoft_del_book_id number(19) not null, + esoft_del_user_id number(19) not null, + constraint pk_esft_dl_bk_sft_dl_sr primary key (esoft_del_book_id,esoft_del_user_id) +); + +create table esoft_del_down ( + id number(19) not null, + esoft_del_mid_id number(19) not null, + down varchar2(255), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_down primary key (id) +); +create sequence esoft_del_down_seq; + +create table esoft_del_mid ( + id number(19) not null, + top_id number(19), + mid varchar2(255), + up_id number(19), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_mid primary key (id) +); +create sequence esoft_del_mid_seq; + +create table esoft_del_role ( + id number(19) not null, + role_name varchar2(255), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_role primary key (id) +); +create sequence esoft_del_role_seq; + +create table esoft_del_role_esoft_del_user ( + esoft_del_role_id number(19) not null, + esoft_del_user_id number(19) not null, + constraint pk_esft_dl_rl_sft_dl_sr primary key (esoft_del_role_id,esoft_del_user_id) +); + +create table esoft_del_top ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_top primary key (id) +); +create sequence esoft_del_top_seq; + +create table esoft_del_up ( + id number(19) not null, + up varchar2(255), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_up primary key (id) +); +create sequence esoft_del_up_seq; + +create table esoft_del_user ( + id number(19) not null, + user_name varchar2(255), + version number(19) not null, + deleted number(1) default 0 not null, + constraint pk_esoft_del_user primary key (id) +); +create sequence esoft_del_user_seq; + +create table esoft_del_user_esoft_del_role ( + esoft_del_user_id number(19) not null, + esoft_del_role_id number(19) not null, + constraint pk_esft_dl_sr_sft_dl_rl primary key (esoft_del_user_id,esoft_del_role_id) +); + +create table esome_convert_type ( + id number(19) not null, + name varchar2(255), + money number(38), + constraint pk_esome_convert_type primary key (id) +); +create sequence esome_convert_type_seq; create table esome_type ( id number(10) not null, @@ -691,6 +1215,15 @@ create table etrans_many ( ); create sequence etrans_many_seq; +create table rawinherit_uncle ( + id number(10) not null, + name varchar2(255), + parent_id number(19) not null, + version number(19) not null, + constraint pk_rawinherit_uncle primary key (id) +); +create sequence rawinherit_uncle_seq; + create table evanilla_collection ( id number(10) not null, name varchar2(255), @@ -709,11 +1242,11 @@ create sequence evanilla_collection_detail_seq; create table ewho_props ( id number(19) not null, name varchar2(255), - who_created varchar2(255) not null, - who_modified varchar2(255) not null, version number(19) not null, when_created timestamp not null, when_modified timestamp not null, + who_created varchar2(255) not null, + who_modified varchar2(255) not null, constraint pk_ewho_props primary key (id) ); create sequence ewho_props_seq; @@ -744,6 +1277,15 @@ create table td_parent ( ); create sequence td_parent_seq; +create table empl ( + id number(19) not null, + name varchar2(255), + age number(10), + default_address_id number(19), + constraint pk_empl primary key (id) +); +create sequence empl_seq; + create table feature_desc ( id number(10) not null, name varchar2(255), @@ -768,18 +1310,17 @@ create table foo ( create sequence foo_seq; create table gen_key_identity ( - id number(19) not null, + id number(19) generated always as identity not null, description varchar2(255), constraint pk_gen_key_identity primary key (id) ); -create sequence gen_key_identity_seq; create table gen_key_sequence ( id number(19) not null, description varchar2(255), constraint pk_gen_key_sequence primary key (id) ); -create sequence seq; +create sequence SEQ; create table gen_key_table ( id number(19) not null, @@ -788,9 +1329,29 @@ create table gen_key_table ( ); create sequence gen_key_table_seq; +create table grand_parent_person ( + identifier number(10) not null, + name varchar2(255), + age number(10), + some_bean_id number(10), + family_name varchar2(255), + address varchar2(255), + constraint pk_grand_parent_person primary key (identifier) +); +create sequence grand_parent_person_seq; + +create table survey_group ( + id number(19) not null, + name varchar2(255), + categoryobjectid number(19), + sequence_number number(10) not null, + constraint pk_survey_group primary key (id) +); +create sequence survey_group_seq; + create table c_group ( id number(19) not null, - inactive number(1), + inactive number(1) default 0 not null, name varchar2(255), version number(19) not null, when_created timestamp not null, @@ -799,6 +1360,62 @@ create table c_group ( ); create sequence c_group_seq; +create table he_doc ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_he_doc primary key (id) +); +create sequence he_doc_seq; + +create table hx_link ( + id number(19) not null, + name varchar2(255), + location varchar2(255), + comments varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_hx_link primary key (id) +); +create sequence hx_link_seq; + +create table hx_link_doc ( + hx_link_id number(19) not null, + he_doc_id number(19) not null, + constraint pk_hx_link_doc primary key (hx_link_id,he_doc_id) +); + +create table hi_doc ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_hi_doc primary key (id) +); +create sequence hi_doc_seq; + +create table hi_link ( + id number(19) not null, + name varchar2(255), + location varchar2(255), + comments varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_hi_link primary key (id) +); +create sequence hi_link_seq; + +create table hi_link_doc ( + hi_link_id number(19) not null, + hi_doc_id number(19) not null, + constraint pk_hi_link_doc primary key (hi_link_id,hi_doc_id) +); + create table imrelated ( id number(19) not null, name varchar2(255), @@ -808,18 +1425,18 @@ create table imrelated ( create sequence imrelated_seq; create table imroot ( - dtype varchar2(10) not null, + dtype varchar2(31) not null, id number(19) not null, + name varchar2(255), title varchar2(255), when_title timestamp, - name varchar2(255), constraint pk_imroot primary key (id) ); create sequence imroot_seq; create table ixresource ( dtype varchar2(255), - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), constraint pk_ixresource primary key (id) ); @@ -870,11 +1487,11 @@ create sequence drel_invoice_seq; create table item ( customer number(10) not null, - itemnumber varchar2(255) not null, + itemnumber varchar2(127) not null, description varchar2(255), units varchar2(255), - type number(10), - region number(10), + type number(10) not null, + region number(10) not null, date_modified timestamp, date_created timestamp, modified_by varchar2(255), @@ -883,6 +1500,59 @@ create table item ( constraint pk_item primary key (customer,itemnumber) ); +create table monkey ( + mid number(19) not null, + name varchar2(255), + food_preference varchar2(255), + version number(19) not null, + constraint pk_monkey primary key (mid) +); +create sequence monkey_seq; + +create table trainer ( + tid number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_trainer primary key (tid) +); +create sequence trainer_seq; + +create table trainer_monkey ( + trainer_tid number(19) not null, + monkey_mid number(19) not null, + constraint uq_trainer_monkey_mid unique (monkey_mid), + constraint pk_trainer_monkey primary key (trainer_tid,monkey_mid) +); + +create table troop ( + pid number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_troop primary key (pid) +); +create sequence troop_seq; + +create table troop_monkey ( + troop_pid number(19) not null, + monkey_mid number(19) not null, + constraint uq_troop_monkey_mid unique (monkey_mid), + constraint pk_troop_monkey primary key (troop_pid,monkey_mid) +); + +create table l2_cldf_reset_bean ( + id number(19) not null, + name varchar2(255), + constraint pk_l2_cldf_reset_bean primary key (id) +); +create sequence l2_cldf_reset_bean_seq; + +create table l2_cldf_reset_bean_child ( + id number(19) not null, + parent_id number(19), + constraint pk_l2_cldf_reset_bean_child primary key (id) +); +create sequence l2_cldf_reset_bean_child_seq; + create table level1 ( id number(19) not null, name varchar2(255), @@ -929,6 +1599,35 @@ create table level4 ( ); create sequence level4_seq; +create table link ( + id number(19) not null, + name varchar2(255), + location varchar2(255), + when_publish timestamp, + link_comment varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + deleted number(1) default 0 not null, + constraint pk_link primary key (id) +); +create sequence link_seq; + +create table link_draft ( + id number(19) not null, + name varchar2(255), + location varchar2(255), + when_publish timestamp, + link_comment varchar2(255), + dirty number(1) default 0 not null, + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + deleted number(1) default 0 not null, + constraint pk_link_draft primary key (id) +); +create sequence link_draft_seq; + create table la_attr_value ( id number(10) not null, name varchar2(255), @@ -959,7 +1658,7 @@ create table non_updateprop ( non_enum varchar2(5), name varchar2(255), note varchar2(255), - constraint ck_non_updateprop_non_enum check (non_enum in ('BEGIN','END')), + constraint ck_non_updateprop_non_enum check ( non_enum in ('BEGIN','END')), constraint pk_non_updateprop primary key (id) ); create sequence non_updateprop_seq; @@ -975,16 +1674,16 @@ create table mprinter ( last_swap_black_id number(19), version number(19) not null, constraint uq_mprinter_last_swap_cyan_id unique (last_swap_cyan_id), - constraint uq_mprinter_last_swap_magen_2 unique (last_swap_magenta_id), - constraint uq_mprinter_last_swap_yello_3 unique (last_swap_yellow_id), - constraint uq_mprinter_last_swap_black_4 unique (last_swap_black_id), + constraint uq_mprntr_lst_swp_mgnt_d unique (last_swap_magenta_id), + constraint uq_mprntr_lst_swp_yllw_d unique (last_swap_yellow_id), + constraint uq_mprntr_lst_swp_blck_d unique (last_swap_black_id), constraint pk_mprinter primary key (id) ); create sequence mprinter_seq; create table mprinter_state ( id number(19) not null, - flags number(19), + flags number(19) not null, printer_id number(19), version number(19) not null, constraint pk_mprinter_state primary key (id) @@ -1041,6 +1740,34 @@ create table muser_type ( ); create sequence muser_type_seq; +create table mail_box ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_mail_box primary key (id) +); +create sequence mail_box_seq; + +create table mail_user ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_mail_user primary key (id) +); +create sequence mail_user_seq; + +create table mail_user_inbox ( + mail_user_id number(19) not null, + mail_box_id number(19) not null, + constraint pk_mail_user_inbox primary key (mail_user_id,mail_box_id) +); + +create table mail_user_outbox ( + mail_user_id number(19) not null, + mail_box_id number(19) not null, + constraint pk_mail_user_outbox primary key (mail_user_id,mail_box_id) +); + create table map_super_actual ( id number(19) not null, name varchar2(255), @@ -1085,6 +1812,57 @@ create table mnoc_user_mnoc_role ( constraint pk_mnoc_user_mnoc_role primary key (mnoc_user_user_id,mnoc_role_role_id) ); +create table mny_a ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_mny_a primary key (id) +); +create sequence mny_a_seq; + +create table mny_b ( + id number(19) not null, + name varchar2(255), + a_id number(19), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_mny_b primary key (id) +); +create sequence mny_b_seq; + +create table mny_b_mny_c ( + mny_b_id number(19) not null, + mny_c_id number(19) not null, + constraint pk_mny_b_mny_c primary key (mny_b_id,mny_c_id) +); + +create table mny_c ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_mny_c primary key (id) +); +create sequence mny_c_seq; + +create table mny_topic ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_mny_topic primary key (id) +); +create sequence mny_topic_seq; + +create table subtopics ( + topic number(19) not null, + subtopic number(19) not null, + constraint pk_subtopics primary key (topic,subtopic) +); + create table mp_role ( id number(19) not null, mp_user_id number(19) not null, @@ -1101,10 +1879,40 @@ create table mp_user ( ); create sequence mp_user_seq; +create table ms_many_a ( + aid number(19) not null, + name varchar2(255), + ms_many_a_many_b number(1) default 0 not null, + ms_many_b number(1) default 0 not null, + deleted number(1) default 0 not null, + constraint pk_ms_many_a primary key (aid) +); +create sequence ms_many_a_seq; + +create table ms_many_a_many_b ( + ms_many_a_aid number(19) not null, + ms_many_b_bid number(19) not null, + constraint pk_ms_many_a_many_b primary key (ms_many_a_aid,ms_many_b_bid) +); + +create table ms_many_b ( + bid number(19) not null, + name varchar2(255), + deleted number(1) default 0 not null, + constraint pk_ms_many_b primary key (bid) +); +create sequence ms_many_b_seq; + +create table ms_many_b_many_a ( + ms_many_b_bid number(19) not null, + ms_many_a_aid number(19) not null, + constraint pk_ms_many_b_many_a primary key (ms_many_b_bid,ms_many_a_aid) +); + create table my_lob_size ( id number(10) not null, name varchar2(255), - my_count number(10), + my_count number(10) not null, my_lob clob, constraint pk_my_lob_size primary key (id) ); @@ -1145,6 +1953,25 @@ create table o_cached_bean_child ( ); create sequence o_cached_bean_child_seq; +create table o_cached_natkey ( + id number(19) not null, + store varchar2(255), + sku varchar2(255), + description varchar2(255), + constraint pk_o_cached_natkey primary key (id) +); +create sequence o_cached_natkey_seq; + +create table o_cached_natkey3 ( + id number(19) not null, + store varchar2(255), + code number(10) not null, + sku varchar2(255), + description varchar2(255), + constraint pk_o_cached_natkey3 primary key (id) +); +create sequence o_cached_natkey3_seq; + create table ocar ( id number(10) not null, vin varchar2(255), @@ -1156,8 +1983,19 @@ create table ocar ( ); create sequence ocar_seq; +create table ocompany ( + id number(10) not null, + corp_id varchar2(50), + cretime timestamp not null, + updtime timestamp not null, + version number(19) not null, + constraint uq_ocompany_corp_id unique (corp_id), + constraint pk_ocompany primary key (id) +); +create sequence ocompany_seq; + create table oengine ( - engine_id raw(16) not null, + engine_id varchar2(40) not null, short_desc varchar2(255), car_id number(10), version number(10) not null, @@ -1166,7 +2004,7 @@ create table oengine ( ); create table ogear_box ( - id raw(16) not null, + id varchar2(40) not null, box_desc varchar2(255), box_size number(10), car_id number(10), @@ -1175,6 +2013,35 @@ create table ogear_box ( constraint pk_ogear_box primary key (id) ); +create table oroad_show_msg ( + id number(10) not null, + company_id number(10) not null, + cretime timestamp not null, + updtime timestamp not null, + version number(19) not null, + constraint uq_oroad_show_msg_company_id unique (company_id), + constraint pk_oroad_show_msg primary key (id) +); +create sequence oroad_show_msg_seq; + +create table om_ordered_detail ( + id number(19) not null, + name varchar2(255), + master_id number(19), + version number(19) not null, + sort_order number(10), + constraint pk_om_ordered_detail primary key (id) +); +create sequence om_ordered_detail_seq; + +create table om_ordered_master ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_om_ordered_master primary key (id) +); +create sequence om_ordered_master_seq; + create table o_order ( id number(10) not null, status number(10), @@ -1183,14 +2050,14 @@ create table o_order ( kcustomer_id number(10) not null, cretime timestamp not null, updtime timestamp not null, - constraint ck_o_order_status check (status in (0,1,2,3)), + constraint ck_o_order_status check ( status in (0,1,2,3)), constraint pk_o_order primary key (id) ); create sequence o_order_seq; create table o_order_detail ( id number(10) not null, - order_id number(10), + order_id number(10) not null, order_qty number(10), ship_qty number(10), unit_price number(19,4), @@ -1202,15 +2069,15 @@ create table o_order_detail ( create sequence o_order_detail_seq; create table s_orders ( - uuid varchar2(255) not null, + uuid varchar2(40) not null, constraint pk_s_orders primary key (uuid) ); create table s_order_items ( - uuid varchar2(255) not null, + uuid varchar2(40) not null, product_variant_uuid varchar2(255), - order_uuid varchar2(255), - quantity number(10), + order_uuid varchar2(40), + quantity number(10) not null, amount number(38), constraint pk_s_order_items primary key (uuid) ); @@ -1226,6 +2093,30 @@ create table or_order_ship ( ); create sequence or_order_ship_seq; +create table organisation ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_organisation primary key (id) +); +create sequence organisation_seq; + +create table oto_bchild ( + master_id number(19) not null, + child varchar2(255), + constraint pk_oto_bchild primary key (master_id) +); +create sequence oto_bchild_seq; + +create table oto_bmaster ( + id number(19) not null, + name varchar2(255), + constraint pk_oto_bmaster primary key (id) +); +create sequence oto_bmaster_seq; + create table oto_child ( id number(10) not null, name varchar2(255), @@ -1235,6 +2126,26 @@ create table oto_child ( ); create sequence oto_child_seq; +create table oto_cust ( + cid number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_oto_cust primary key (cid) +); +create sequence oto_cust_seq; + +create table oto_cust_address ( + aid number(19) not null, + line1 varchar2(255), + line2 varchar2(255), + line3 varchar2(255), + customer_cid number(19), + version number(19) not null, + constraint uq_ot_cst_ddrss_cstmr_cd unique (customer_cid), + constraint pk_oto_cust_address primary key (aid) +); +create sequence oto_cust_address_seq; + create table oto_master ( id number(19) not null, name varchar2(255), @@ -1242,6 +2153,82 @@ create table oto_master ( ); create sequence oto_master_seq; +create table oto_prime ( + pid number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_oto_prime primary key (pid) +); +create sequence oto_prime_seq; + +create table oto_prime_extra ( + eid number(19) not null, + extra varchar2(255), + version number(19) not null, + constraint pk_oto_prime_extra primary key (eid) +); + +create table oto_th_many ( + id number(19) not null, + oto_th_top_id number(19) not null, + many varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_oto_th_many primary key (id) +); +create sequence oto_th_many_seq; + +create table oto_th_one ( + id number(19) not null, + one number(1) default 0 not null, + many_id number(19), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint uq_oto_th_one_many_id unique (many_id), + constraint pk_oto_th_one primary key (id) +); +create sequence oto_th_one_seq; + +create table oto_th_top ( + id number(19) not null, + topp varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_oto_th_top primary key (id) +); +create sequence oto_th_top_seq; + +create table oto_ubprime ( + pid varchar2(40) not null, + name varchar2(255), + version number(19) not null, + constraint pk_oto_ubprime primary key (pid) +); + +create table oto_ubprime_extra ( + eid varchar2(40) not null, + extra varchar2(255), + version number(19) not null, + constraint pk_oto_ubprime_extra primary key (eid) +); + +create table oto_uprime ( + pid varchar2(40) not null, + name varchar2(255), + version number(19) not null, + constraint pk_oto_uprime primary key (pid) +); + +create table oto_uprime_extra ( + eid varchar2(40) not null, + extra varchar2(255), + version number(19) not null, + constraint pk_oto_uprime_extra primary key (eid) +); + create table pfile ( id number(10) not null, name varchar2(255), @@ -1267,7 +2254,7 @@ create table pfile_content ( create sequence pfile_content_seq; create table paggview ( - pview_id raw(16), + pview_id varchar2(40), amount number(10) not null, constraint uq_paggview_pview_id unique (pview_id) ); @@ -1301,6 +2288,7 @@ create table rawinherit_parent ( type varchar2(31) not null, id number(19) not null, val number(10), + more varchar2(255), constraint pk_rawinherit_parent primary key (id) ); create sequence rawinherit_parent_seq; @@ -1308,9 +2296,21 @@ create sequence rawinherit_parent_seq; create table rawinherit_parent_rawinherit_d ( rawinherit_parent_id number(19) not null, rawinherit_data_id number(19) not null, - constraint pk_rawinherit_parent_rawinh_0 primary key (rawinherit_parent_id,rawinherit_data_id) + constraint pk_rwnhrt_prnt_rwnhrt_d primary key (rawinherit_parent_id,rawinherit_data_id) ); +create table parent_person ( + identifier number(10) not null, + name varchar2(255), + age number(10), + some_bean_id number(10), + parent_identifier number(10), + family_name varchar2(255), + address varchar2(255), + constraint pk_parent_person primary key (identifier) +); +create sequence parent_person_seq; + create table c_participation ( id number(19) not null, rating number(10), @@ -1320,13 +2320,13 @@ create table c_participation ( version number(19) not null, when_created timestamp not null, when_modified timestamp not null, - constraint ck_c_participation_type check (type in (0,1)), + constraint ck_c_participation_type check ( type in (0,1)), constraint pk_c_participation primary key (id) ); create sequence c_participation_seq; create table mt_permission ( - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), constraint pk_mt_permission primary key (id) ); @@ -1348,7 +2348,7 @@ create table persistent_file_content ( cretime timestamp not null, updtime timestamp not null, version number(19) not null, - constraint uq_persistent_file_content__1 unique (persistent_file_id), + constraint uq_prsstnt_fl_cntnt_prsstnt_1 unique (persistent_file_id), constraint pk_persistent_file_content primary key (id) ); create sequence persistent_file_content_seq; @@ -1359,7 +2359,7 @@ create table persons ( name varchar2(64) not null, constraint pk_persons primary key (id) ); -create sequence persons_seq start with 1000 increment by 40; +create sequence PERSONS_seq start with 1000; create table person ( oid number(19) not null, @@ -1376,7 +2376,15 @@ create table phones ( constraint uq_phones_phone_number unique (phone_number), constraint pk_phones primary key (id) ); -create sequence phones_seq; +create sequence PHONES_seq; + +create table primary_revision ( + id number(19) not null, + revision number(10) not null, + name varchar2(255), + version number(19) not null, + constraint pk_primary_revision primary key (id,revision) +); create table o_product ( id number(10) not null, @@ -1389,29 +2397,38 @@ create table o_product ( create sequence o_product_seq; create table pp ( - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), value varchar2(100) not null, constraint pk_pp primary key (id) ); create table pp_to_ww ( - pp_id raw(16) not null, - ww_id raw(16) not null, + pp_id varchar2(40) not null, + ww_id varchar2(40) not null, constraint pk_pp_to_ww primary key (pp_id,ww_id) ); +create table question ( + id number(19) not null, + name varchar2(255), + groupobjectid number(19), + sequence_number number(10) not null, + constraint pk_question primary key (id) +); +create sequence question_seq; + create table rcustomer ( - company varchar2(255) not null, - name varchar2(255) not null, + company varchar2(127) not null, + name varchar2(127) not null, description varchar2(255), constraint pk_rcustomer primary key (company,name) ); create table r_orders ( - company varchar2(255) not null, + company varchar2(127) not null, order_number number(10) not null, - customername varchar2(255), + customername varchar2(127), item varchar2(255), constraint pk_r_orders primary key (company,order_number) ); @@ -1431,20 +2448,6 @@ create table resourcefile ( constraint pk_resourcefile primary key (id) ); -create table mt_role ( - id raw(16) not null, - name varchar2(50), - tenant_id raw(16), - version number(19) not null, - constraint pk_mt_role primary key (id) -); - -create table mt_role_permission ( - mt_role_id raw(16) not null, - mt_permission_id raw(16) not null, - constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) -); - create table em_role ( id number(19) not null, name varchar2(255), @@ -1452,8 +2455,23 @@ create table em_role ( ); create sequence em_role_seq; +create table mt_role ( + id varchar2(40) not null, + name varchar2(50), + tenant_id varchar2(40), + version number(19) not null, + constraint pk_mt_role primary key (id) +); + +create table mt_role_permission ( + mt_role_id varchar2(40) not null, + mt_permission_id varchar2(40) not null, + constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) +); + create table f_second ( id number(19) not null, + mod_name varchar2(255), first number(19), title varchar2(255), constraint uq_f_second_first unique (first), @@ -1469,7 +2487,7 @@ create table section ( cretime timestamp not null, updtime timestamp not null, version number(19) not null, - constraint ck_section_type check (type in (0,1)), + constraint ck_section_type check ( type in (0,1)), constraint pk_section primary key (id) ); create sequence section_seq; @@ -1503,7 +2521,7 @@ create table some_enum_bean ( id number(19) not null, some_enum number(10), name varchar2(255), - constraint ck_some_enum_bean_some_enum check (some_enum in (0,1)), + constraint ck_some_enum_bean_some_enum check ( some_enum in (0,1)), constraint pk_some_enum_bean primary key (id) ); create sequence some_enum_bean_seq; @@ -1530,18 +2548,16 @@ create table some_new_types_bean ( instant timestamp, zone_id varchar2(60), zone_offset varchar2(60), + path varchar2(255), version number(19) not null, - constraint ck_some_new_types_bean_dow check (dow in ('1','2','3','4','5','6','7')), - constraint ck_some_new_types_bean_mth check (mth in ('1','2','3','4','5','6','7','8','9','10','11','12')), + constraint ck_some_new_types_bean_dow check ( dow in (1,2,3,4,5,6,7)), + constraint ck_some_new_types_bean_mth check ( mth in (1,2,3,4,5,6,7,8,9,10,11,12)), constraint pk_some_new_types_bean primary key (id) ); create sequence some_new_types_bean_seq; create table some_period_bean ( id number(19) not null, - period_years number(10), - period_months number(10), - period_days number(10), anniversary date, version number(19) not null, constraint pk_some_period_bean primary key (id) @@ -1575,6 +2591,13 @@ create table sub_type ( ); create sequence sub_type_seq; +create table survey ( + id number(19) not null, + name varchar2(255), + constraint pk_survey primary key (id) +); +create sequence survey_seq; + create table tbytes_only ( id number(10) not null, content blob, @@ -1584,11 +2607,40 @@ create sequence tbytes_only_seq; create table tcar ( type varchar2(31) not null, - plate_no varchar2(255) not null, + plate_no varchar2(32) not null, truckload number(19), constraint pk_tcar primary key (plate_no) ); +create table tevent ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + constraint pk_tevent primary key (id) +); +create sequence tevent_seq; + +create table tevent_many ( + id number(19) not null, + description varchar2(255), + event_id number(19), + units number(10) not null, + amount number(19,4) not null, + version number(19) not null, + constraint pk_tevent_many primary key (id) +); +create sequence tevent_many_seq; + +create table tevent_one ( + id number(19) not null, + name varchar2(255), + event_id number(19), + version number(19) not null, + constraint uq_tevent_one_event_id unique (event_id), + constraint pk_tevent_one primary key (id) +); +create sequence tevent_one_seq; + create table tint_root ( my_type number(3) not null, id number(10) not null, @@ -1618,7 +2670,7 @@ create table t_oneb ( id number(10) not null, name varchar2(255), description varchar2(255), - active number(1), + active number(1) default 0 not null, constraint pk_t_oneb primary key (id) ); create sequence t_oneb_seq; @@ -1627,9 +2679,11 @@ create table t_detail_with_other_namexxxyy ( id number(10) not null, name varchar2(255), description varchar2(255), - active number(1), + some_unique_value varchar2(127), + active number(1) default 0 not null, master_id number(10), - constraint pk_t_detail_with_other_name_0 primary key (id) + constraint uq_t_dtl_wth_thr_nmxxxyy_sm_1 unique (some_unique_value), + constraint pk_t_dtl_wth_thr_nmxxxyy primary key (id) ); create sequence t_atable_detail_seq; @@ -1637,7 +2691,7 @@ create table ts_detail_two ( id number(10) not null, name varchar2(255), description varchar2(255), - active number(1), + active number(1) default 0 not null, master_id number(10), constraint pk_ts_detail_two primary key (id) ); @@ -1647,7 +2701,7 @@ create table t_atable_thatisrelatively ( id number(10) not null, name varchar2(255), description varchar2(255), - active number(1), + active number(1) default 0 not null, constraint pk_t_atable_thatisrelatively primary key (id) ); create sequence t_atable_master_seq; @@ -1656,20 +2710,20 @@ create table ts_master_two ( id number(10) not null, name varchar2(255), description varchar2(255), - active number(1), + active number(1) default 0 not null, constraint pk_ts_master_two primary key (id) ); create sequence ts_master_two_seq; create table tuuid_entity ( - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), constraint pk_tuuid_entity primary key (id) ); create table twheel ( id number(19) not null, - owner_plate_no varchar2(255) not null, + owner_plate_no varchar2(32) not null, constraint pk_twheel primary key (id) ); create sequence twheel_seq; @@ -1683,18 +2737,21 @@ create table twith_pre_insert ( create sequence twith_pre_insert_seq; create table mt_tenant ( - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), version number(19) not null, constraint pk_mt_tenant primary key (id) ); -create table sa_tire ( - id number(19) not null, - version number(10) not null, - constraint pk_sa_tire primary key (id) +create table test_annotation_base_entity ( + direct varchar2(255), + meta varchar2(255), + mixed varchar2(255), + constraint_annotation varchar2(40), + null1 varchar2(255) not null, + null2 varchar2(255), + null3 varchar2(255) ); -create sequence sa_tire_seq; create table tire ( id number(19) not null, @@ -1705,6 +2762,13 @@ create table tire ( ); create sequence tire_seq; +create table sa_tire ( + id number(19) not null, + version number(10) not null, + constraint pk_sa_tire primary key (id) +); +create sequence sa_tire_seq; + create table trip ( id number(10) not null, vehicle_driver_id number(10), @@ -1734,6 +2798,15 @@ create table type ( constraint pk_type primary key (customer,type) ); +create table tz_bean ( + id number(19) not null, + moda varchar2(255), + ts timestamp, + tstz timestamp, + constraint pk_tz_bean primary key (id) +); +create sequence tz_bean_seq; + create table ut_detail ( id number(10) not null, utmaster_id number(10) not null, @@ -1755,24 +2828,31 @@ create table ut_master ( create sequence ut_master_seq; create table uuone ( - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), constraint pk_uuone primary key (id) ); create table uutwo ( - id raw(16) not null, + id varchar2(40) not null, name varchar2(255), - master_id raw(16), + master_id varchar2(40), constraint pk_uutwo primary key (id) ); -create table em_user ( +create table c_user ( id number(19) not null, + inactive number(1) default 0 not null, name varchar2(255), - constraint pk_em_user primary key (id) + email varchar2(255), + password_hash varchar2(255), + group_id number(19), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + constraint pk_c_user primary key (id) ); -create sequence em_user_seq; +create sequence c_user_seq; create table tx_user ( id number(19) not null, @@ -1781,18 +2861,20 @@ create table tx_user ( ); create sequence tx_user_seq; -create table c_user ( +create table g_user ( id number(19) not null, - inactive number(1), - name varchar2(255), - email varchar2(255), - group_id number(19), + username varchar2(255), version number(19) not null, - when_created timestamp not null, - when_modified timestamp not null, - constraint pk_c_user primary key (id) + constraint pk_g_user primary key (id) ); -create sequence c_user_seq; +create sequence g_user_seq; + +create table em_user ( + id number(19) not null, + name varchar2(255), + constraint pk_em_user primary key (id) +); +create sequence em_user_seq; create table oto_user ( id number(19) not null, @@ -1820,10 +2902,13 @@ create table vehicle ( cretime timestamp not null, updtime timestamp not null, version number(19) not null, - truck_ref_id number(10), - capacity number(19,4), + siz varchar2(1), driver varchar2(255), car_ref_id number(10), + notes varchar2(255), + truck_ref_id number(10), + capacity number(19,4), + constraint ck_vehicle_siz check ( siz in ('S','M','L','H')), constraint pk_vehicle primary key (id) ); create sequence vehicle_seq; @@ -1863,13 +2948,6 @@ create table sa_wheel ( ); create sequence sa_wheel_seq; -create table sp_car_wheel ( - id number(19) not null, - version number(10) not null, - constraint pk_sp_car_wheel primary key (id) -); -create sequence sp_car_wheel_seq; - create table wheel ( id number(19) not null, version number(10) not null, @@ -1877,10 +2955,30 @@ create table wheel ( ); create sequence wheel_seq; +create table sp_car_wheel ( + id number(19) not null, + version number(10) not null, + constraint pk_sp_car_wheel primary key (id) +); +create sequence sp_car_wheel_seq; + +create table g_who_props_otm ( + id number(19) not null, + name varchar2(255), + version number(19) not null, + when_created timestamp not null, + when_modified timestamp not null, + who_created_id number(19), + who_modified_id number(19), + constraint pk_g_who_props_otm primary key (id) +); +create sequence g_who_props_otm_seq; + create table with_zero ( id number(19) not null, name varchar2(255), parent_id number(10), + lang varchar2(2) default 'en' not null, version number(19) not null, constraint pk_with_zero primary key (id) ); @@ -1894,8 +2992,8 @@ create table parent ( create sequence parent_seq; create table wview ( - id raw(16) not null, - name varchar2(255) not null, + id varchar2(40) not null, + name varchar2(127) not null, constraint uq_wview_name unique (name), constraint pk_wview primary key (id) ); @@ -1908,48 +3006,85 @@ create table zones ( ); create sequence zones_seq; +create index ix_cntct_lst_nm_frst_nm on contact (last_name,first_name); +create index ix_e_basic_name on e_basic (name); alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id); create index ix_bar_foo_id on bar (foo_id); +alter table addr add constraint fk_addr_employee_id foreign key (employee_id) references empl (id); +create index ix_addr_employee_id on addr (employee_id); + alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code); create index ix_o_address_country_code on o_address (country_code); -alter table animals add constraint fk_animals_shelter_id foreign key (shelter_id) references animal_shelter (id); -create index ix_animals_shelter_id on animals (shelter_id); +alter table album add constraint fk_album_cover_id foreign key (cover_id) references cover (id); -alter table attribute add constraint fk_attribute_attribute_hold_1 foreign key (attribute_holder_id) references attribute_holder (id); -create index ix_attribute_attribute_hold_1 on attribute (attribute_holder_id); +alter table animal add constraint fk_animal_shelter_id foreign key (shelter_id) references animal_shelter (id); +create index ix_animal_shelter_id on animal (shelter_id); + +alter table attribute add constraint fk_attrbt_ttrbt_hldr_d foreign key (attribute_holder_id) references attribute_holder (id); +create index ix_attrbt_ttrbt_hldr_d on attribute (attribute_holder_id); alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id); create index ix_bbookmark_user_id on bbookmark (user_id); +alter table bsite_user add constraint fk_bsite_user_site_id foreign key (site_id) references bsite (id); +create index ix_bsite_user_site_id on bsite_user (site_id); + +alter table bsite_user add constraint fk_bsite_user_user_id foreign key (user_id) references buser (id); +create index ix_bsite_user_user_id on bsite_user (user_id); + +alter table bsite_user_b add constraint fk_bsite_user_b_site foreign key (site) references bsite (id); +create index ix_bsite_user_b_site on bsite_user_b (site); + +alter table bsite_user_b add constraint fk_bsite_user_b_usr foreign key (usr) references buser (id); +create index ix_bsite_user_b_usr on bsite_user_b (usr); + +alter table bsite_user_c add constraint fk_bsite_user_c_site_uid foreign key (site_uid) references bsite (id); +create index ix_bsite_user_c_site_uid on bsite_user_c (site_uid); + +alter table bsite_user_c add constraint fk_bsite_user_c_user_uid foreign key (user_uid) references buser (id); +create index ix_bsite_user_c_user_uid on bsite_user_c (user_uid); + alter table drel_booking add constraint fk_drel_booking_agent_invoice foreign key (agent_invoice) references drel_invoice (id); -alter table drel_booking add constraint fk_drel_booking_client_invo_2 foreign key (client_invoice) references drel_invoice (id); +alter table drel_booking add constraint fk_drl_bkng_clnt_nvc foreign key (client_invoice) references drel_invoice (id); -alter table ckey_detail add constraint fk_ckey_detail_ckey_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key); -create index ix_ckey_detail_one_key_two__1 on ckey_detail (one_key,two_key); +alter table ckey_detail add constraint fk_ckey_detail_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key); +create index ix_ckey_detail_parent on ckey_detail (one_key,two_key); alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id); create index ix_ckey_parent_assoc_id on ckey_parent (assoc_id); -alter table calculation_result add constraint fk_calculation_result_produ_1 foreign key (product_configuration_id) references configuration (id); -create index ix_calculation_result_produ_1 on calculation_result (product_configuration_id); +alter table calculation_result add constraint fk_clcltn_rslt_prdct_cnfgrt_1 foreign key (product_configuration_id) references configuration (id); +create index ix_clcltn_rslt_prdct_cnfgrt_1 on calculation_result (product_configuration_id); -alter table calculation_result add constraint fk_calculation_result_group_2 foreign key (group_configuration_id) references configuration (id); -create index ix_calculation_result_group_2 on calculation_result (group_configuration_id); +alter table calculation_result add constraint fk_clcltn_rslt_grp_cnfgrtn_d foreign key (group_configuration_id) references configuration (id); +create index ix_clcltn_rslt_grp_cnfgrtn_d on calculation_result (group_configuration_id); -alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_1 foreign key (car) references sp_car_car (id); -create index ix_sp_car_car_wheels_car on sp_car_car_wheels (car); +alter table sp_car_car_wheels add constraint fk_sp_cr_cr_whls_sp_cr_cr foreign key (car) references sp_car_car (id); +create index ix_sp_cr_cr_whls_sp_cr_cr on sp_car_car_wheels (car); -alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_2 foreign key (wheel) references sp_car_wheel (id); -create index ix_sp_car_car_wheels_wheel on sp_car_car_wheels (wheel); +alter table sp_car_car_wheels add constraint fk_sp_cr_cr_whls_sp_cr_whl foreign key (wheel) references sp_car_wheel (id); +create index ix_sp_cr_cr_whls_sp_cr_whl on sp_car_car_wheels (wheel); + +alter table car_accessory add constraint fk_car_accessory_fuse_id foreign key (fuse_id) references car_fuse (id); +create index ix_car_accessory_fuse_id on car_accessory (fuse_id); alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id); create index ix_car_accessory_car_id on car_accessory (car_id); -alter table configuration add constraint fk_configuration_configurat_1 foreign key (configurations_id) references configurations (id); -create index ix_configuration_configurat_1 on configuration (configurations_id); +alter table category add constraint fk_category_surveyobjectid foreign key (surveyobjectid) references survey (id); +create index ix_category_surveyobjectid on category (surveyobjectid); + +alter table child_person add constraint fk_child_person_some_bean_id foreign key (some_bean_id) references e_basic (id); +create index ix_child_person_some_bean_id on child_person (some_bean_id); + +alter table child_person add constraint fk_chld_prsn_prnt_dntfr foreign key (parent_identifier) references parent_person (identifier); +create index ix_chld_prsn_prnt_dntfr on child_person (parent_identifier); + +alter table configuration add constraint fk_cnfgrtn_cnfgrtns_d foreign key (configurations_id) references configurations (id); +create index ix_cnfgrtn_cnfgrtns_d on configuration (configurations_id); alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id); create index ix_contact_customer_id on contact (customer_id); @@ -1963,11 +3098,60 @@ create index ix_contact_note_contact_id on contact_note (contact_id); alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id); create index ix_c_conversation_group_id on c_conversation (group_id); -alter table o_customer add constraint fk_o_customer_billing_addre_1 foreign key (billing_address_id) references o_address (id); -create index ix_o_customer_billing_addre_1 on o_customer (billing_address_id); +alter table o_customer add constraint fk_o_cstmr_bllng_ddrss_d foreign key (billing_address_id) references o_address (id); +create index ix_o_cstmr_bllng_ddrss_d on o_customer (billing_address_id); -alter table o_customer add constraint fk_o_customer_shipping_addr_2 foreign key (shipping_address_id) references o_address (id); -create index ix_o_customer_shipping_addr_2 on o_customer (shipping_address_id); +alter table o_customer add constraint fk_o_cstmr_shppng_ddrss_d foreign key (shipping_address_id) references o_address (id); +create index ix_o_cstmr_shppng_ddrss_d on o_customer (shipping_address_id); + +alter table dcredit_drol add constraint fk_dcredit_drol_dcredit foreign key (dcredit_id) references dcredit (id); +create index ix_dcredit_drol_dcredit on dcredit_drol (dcredit_id); + +alter table dcredit_drol add constraint fk_dcredit_drol_drol foreign key (drol_id) references drol (id); +create index ix_dcredit_drol_drol on dcredit_drol (drol_id); + +alter table drot_drol add constraint fk_drot_drol_drot foreign key (drot_id) references drot (id); +create index ix_drot_drol_drot on drot_drol (drot_id); + +alter table drot_drol add constraint fk_drot_drol_drol foreign key (drol_id) references drol (id); +create index ix_drot_drol_drol on drot_drol (drol_id); + +alter table dfk_cascade add constraint fk_dfk_cascade_one_id foreign key (one_id) references dfk_cascade_one (id) on delete cascade; +create index ix_dfk_cascade_one_id on dfk_cascade (one_id); + +alter table dfk_set_null add constraint fk_dfk_set_null_one_id foreign key (one_id) references dfk_one (id) on delete set null; +create index ix_dfk_set_null_one_id on dfk_set_null (one_id); + +alter table doc add constraint fk_doc_id foreign key (id) references doc_draft (id); + +alter table doc_link add constraint fk_doc_link_doc foreign key (doc_id) references doc (id); +create index ix_doc_link_doc on doc_link (doc_id); + +alter table doc_link add constraint fk_doc_link_link foreign key (link_id) references link (id); +create index ix_doc_link_link on doc_link (link_id); + +alter table document add constraint fk_document_id foreign key (id) references document_draft (id); + +alter table document add constraint fk_document_organisation_id foreign key (organisation_id) references organisation (id); +create index ix_document_organisation_id on document (organisation_id); + +alter table document_draft add constraint fk_dcmnt_drft_rgnstn_d foreign key (organisation_id) references organisation (id); +create index ix_dcmnt_drft_rgnstn_d on document_draft (organisation_id); + +alter table document_media add constraint fk_document_media_document_id foreign key (document_id) references document (id); +create index ix_document_media_document_id on document_media (document_id); + +alter table document_media_draft add constraint fk_dcmnt_md_drft_dcmnt_d foreign key (document_id) references document_draft (id); +create index ix_dcmnt_md_drft_dcmnt_d on document_media_draft (document_id); + +alter table ebasic_json_map_detail add constraint fk_ebsc_jsn_mp_dtl_wnr_d foreign key (owner_id) references ebasic_json_map (id); +create index ix_ebsc_jsn_mp_dtl_wnr_d on ebasic_json_map_detail (owner_id); + +alter table ebasic_no_sdchild add constraint fk_ebasic_no_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id); +create index ix_ebasic_no_sdchild_owner_id on ebasic_no_sdchild (owner_id); + +alter table ebasic_sdchild add constraint fk_ebasic_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id); +create index ix_ebasic_sdchild_owner_id on ebasic_sdchild (owner_id); alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id); create index ix_eemb_inner_outer_id on eemb_inner (outer_id); @@ -1975,8 +3159,8 @@ create index ix_eemb_inner_outer_id on eemb_inner (outer_id); alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id); create index ix_einvoice_person_id on einvoice (person_id); -alter table enull_collection_detail add constraint fk_enull_collection_detail__1 foreign key (enull_collection_id) references enull_collection (id); -create index ix_enull_collection_detail__1 on enull_collection_detail (enull_collection_id); +alter table enull_collection_detail add constraint fk_enll_cllctn_dtl_nll_cllc_1 foreign key (enull_collection_id) references enull_collection (id); +create index ix_enll_cllctn_dtl_nll_cllc_1 on enull_collection_detail (enull_collection_id); alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id); create index ix_eopt_one_a_b_id on eopt_one_a (b_id); @@ -1984,12 +3168,66 @@ create index ix_eopt_one_a_b_id on eopt_one_a (b_id); alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id); create index ix_eopt_one_b_c_id on eopt_one_b (c_id); -alter table evanilla_collection_detail add constraint fk_evanilla_collection_deta_1 foreign key (evanilla_collection_id) references evanilla_collection (id); -create index ix_evanilla_collection_deta_1 on evanilla_collection_detail (evanilla_collection_id); +alter table esoft_del_book add constraint fk_esoft_del_book_lend_by_id foreign key (lend_by_id) references esoft_del_user (id); +create index ix_esoft_del_book_lend_by_id on esoft_del_book (lend_by_id); + +alter table esoft_del_book_esoft_del_user add constraint fk_esft_dl_bk_sft_dl_sr_sft_1 foreign key (esoft_del_book_id) references esoft_del_book (id); +create index ix_esft_dl_bk_sft_dl_sr_sft_1 on esoft_del_book_esoft_del_user (esoft_del_book_id); + +alter table esoft_del_book_esoft_del_user add constraint fk_esft_dl_bk_sft_dl_sr_sft_2 foreign key (esoft_del_user_id) references esoft_del_user (id); +create index ix_esft_dl_bk_sft_dl_sr_sft_2 on esoft_del_book_esoft_del_user (esoft_del_user_id); + +alter table esoft_del_down add constraint fk_esft_dl_dwn_sft_dl_md_d foreign key (esoft_del_mid_id) references esoft_del_mid (id); +create index ix_esft_dl_dwn_sft_dl_md_d on esoft_del_down (esoft_del_mid_id); + +alter table esoft_del_mid add constraint fk_esoft_del_mid_top_id foreign key (top_id) references esoft_del_top (id); +create index ix_esoft_del_mid_top_id on esoft_del_mid (top_id); + +alter table esoft_del_mid add constraint fk_esoft_del_mid_up_id foreign key (up_id) references esoft_del_up (id); +create index ix_esoft_del_mid_up_id on esoft_del_mid (up_id); + +alter table esoft_del_role_esoft_del_user add constraint fk_esft_dl_rl_sft_dl_sr_sft_1 foreign key (esoft_del_role_id) references esoft_del_role (id); +create index ix_esft_dl_rl_sft_dl_sr_sft_1 on esoft_del_role_esoft_del_user (esoft_del_role_id); + +alter table esoft_del_role_esoft_del_user add constraint fk_esft_dl_rl_sft_dl_sr_sft_2 foreign key (esoft_del_user_id) references esoft_del_user (id); +create index ix_esft_dl_rl_sft_dl_sr_sft_2 on esoft_del_role_esoft_del_user (esoft_del_user_id); + +alter table esoft_del_user_esoft_del_role add constraint fk_esft_dl_sr_sft_dl_rl_sft_1 foreign key (esoft_del_user_id) references esoft_del_user (id); +create index ix_esft_dl_sr_sft_dl_rl_sft_1 on esoft_del_user_esoft_del_role (esoft_del_user_id); + +alter table esoft_del_user_esoft_del_role add constraint fk_esft_dl_sr_sft_dl_rl_sft_2 foreign key (esoft_del_role_id) references esoft_del_role (id); +create index ix_esft_dl_sr_sft_dl_rl_sft_2 on esoft_del_user_esoft_del_role (esoft_del_role_id); + +alter table rawinherit_uncle add constraint fk_rawinherit_uncle_parent_id foreign key (parent_id) references rawinherit_parent (id); +create index ix_rawinherit_uncle_parent_id on rawinherit_uncle (parent_id); + +alter table evanilla_collection_detail add constraint fk_evnll_cllctn_dtl_vnll_cl_1 foreign key (evanilla_collection_id) references evanilla_collection (id); +create index ix_evnll_cllctn_dtl_vnll_cl_1 on evanilla_collection_detail (evanilla_collection_id); alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id); create index ix_td_child_parent_id on td_child (parent_id); +alter table empl add constraint fk_empl_default_address_id foreign key (default_address_id) references addr (id); +create index ix_empl_default_address_id on empl (default_address_id); + +alter table grand_parent_person add constraint fk_grnd_prnt_prsn_sm_bn_d foreign key (some_bean_id) references e_basic (id); +create index ix_grnd_prnt_prsn_sm_bn_d on grand_parent_person (some_bean_id); + +alter table survey_group add constraint fk_srvy_grp_ctgrybjctd foreign key (categoryobjectid) references category (id); +create index ix_srvy_grp_ctgrybjctd on survey_group (categoryobjectid); + +alter table hx_link_doc add constraint fk_hx_link_doc_hx_link foreign key (hx_link_id) references hx_link (id); +create index ix_hx_link_doc_hx_link on hx_link_doc (hx_link_id); + +alter table hx_link_doc add constraint fk_hx_link_doc_he_doc foreign key (he_doc_id) references he_doc (id); +create index ix_hx_link_doc_he_doc on hx_link_doc (he_doc_id); + +alter table hi_link_doc add constraint fk_hi_link_doc_hi_link foreign key (hi_link_id) references hi_link (id); +create index ix_hi_link_doc_hi_link on hi_link_doc (hi_link_id); + +alter table hi_link_doc add constraint fk_hi_link_doc_hi_doc foreign key (hi_doc_id) references hi_doc (id); +create index ix_hi_link_doc_hi_doc on hi_link_doc (hi_doc_id); + alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id); create index ix_imrelated_owner_id on imrelated (owner_id); @@ -2003,46 +3241,59 @@ alter table inner_report add constraint fk_inner_report_forecast_id foreign key alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id); create index ix_drel_invoice_booking on drel_invoice (booking); -alter table item add constraint fk_item_type foreign key (customer,type) references type (customer,type); -create index ix_item_customer_type on item (customer,type); +alter table item add constraint fk_item_etype foreign key (customer,type) references type (customer,type); +create index ix_item_etype on item (customer,type); -alter table item add constraint fk_item_region foreign key (customer,region) references region (customer,type); -create index ix_item_customer_region on item (customer,region); +alter table item add constraint fk_item_eregion foreign key (customer,region) references region (customer,type); +create index ix_item_eregion on item (customer,region); + +alter table trainer_monkey add constraint fk_trainer_monkey_trainer foreign key (trainer_tid) references trainer (tid); + +alter table trainer_monkey add constraint fk_trainer_monkey_monkey foreign key (monkey_mid) references monkey (mid); + +alter table troop_monkey add constraint fk_troop_monkey_troop foreign key (troop_pid) references troop (pid); + +alter table troop_monkey add constraint fk_troop_monkey_monkey foreign key (monkey_mid) references monkey (mid); + +alter table l2_cldf_reset_bean_child add constraint fk_l2_cldf_rst_bn_chld_prnt_d foreign key (parent_id) references l2_cldf_reset_bean (id); +create index ix_l2_cldf_rst_bn_chld_prnt_d on l2_cldf_reset_bean_child (parent_id); alter table level1_level4 add constraint fk_level1_level4_level1 foreign key (level1_id) references level1 (id); -create index ix_level1_level4_level1_id on level1_level4 (level1_id); +create index ix_level1_level4_level1 on level1_level4 (level1_id); alter table level1_level4 add constraint fk_level1_level4_level4 foreign key (level4_id) references level4 (id); -create index ix_level1_level4_level4_id on level1_level4 (level4_id); +create index ix_level1_level4_level4 on level1_level4 (level4_id); alter table level1_level2 add constraint fk_level1_level2_level1 foreign key (level1_id) references level1 (id); -create index ix_level1_level2_level1_id on level1_level2 (level1_id); +create index ix_level1_level2_level1 on level1_level2 (level1_id); alter table level1_level2 add constraint fk_level1_level2_level2 foreign key (level2_id) references level2 (id); -create index ix_level1_level2_level2_id on level1_level2 (level2_id); +create index ix_level1_level2_level2 on level1_level2 (level2_id); alter table level2_level3 add constraint fk_level2_level3_level2 foreign key (level2_id) references level2 (id); -create index ix_level2_level3_level2_id on level2_level3 (level2_id); +create index ix_level2_level3_level2 on level2_level3 (level2_id); alter table level2_level3 add constraint fk_level2_level3_level3 foreign key (level3_id) references level3 (id); -create index ix_level2_level3_level3_id on level2_level3 (level3_id); +create index ix_level2_level3_level3 on level2_level3 (level3_id); -alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute__1 foreign key (la_attr_value_id) references la_attr_value (id); -create index ix_la_attr_value_attribute__1 on la_attr_value_attribute (la_attr_value_id); +alter table link add constraint fk_link_id foreign key (id) references link_draft (id); -alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute__2 foreign key (attribute_id) references attribute (id); -create index ix_la_attr_value_attribute__2 on la_attr_value_attribute (attribute_id); +alter table la_attr_value_attribute add constraint fk_l_ttr_vl_ttrbt_l_ttr_vl foreign key (la_attr_value_id) references la_attr_value (id); +create index ix_l_ttr_vl_ttrbt_l_ttr_vl on la_attr_value_attribute (la_attr_value_id); + +alter table la_attr_value_attribute add constraint fk_l_ttr_vl_ttrbt_ttrbt foreign key (attribute_id) references attribute (id); +create index ix_l_ttr_vl_ttrbt_ttrbt on la_attr_value_attribute (attribute_id); alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id); create index ix_mprinter_current_state_id on mprinter (current_state_id); alter table mprinter add constraint fk_mprinter_last_swap_cyan_id foreign key (last_swap_cyan_id) references mprinter_state (id); -alter table mprinter add constraint fk_mprinter_last_swap_magen_3 foreign key (last_swap_magenta_id) references mprinter_state (id); +alter table mprinter add constraint fk_mprntr_lst_swp_mgnt_d foreign key (last_swap_magenta_id) references mprinter_state (id); -alter table mprinter add constraint fk_mprinter_last_swap_yello_4 foreign key (last_swap_yellow_id) references mprinter_state (id); +alter table mprinter add constraint fk_mprntr_lst_swp_yllw_d foreign key (last_swap_yellow_id) references mprinter_state (id); -alter table mprinter add constraint fk_mprinter_last_swap_black_5 foreign key (last_swap_black_id) references mprinter_state (id); +alter table mprinter add constraint fk_mprntr_lst_swp_blck_d foreign key (last_swap_black_id) references mprinter_state (id); alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id); create index ix_mprinter_state_printer_id on mprinter_state (printer_id); @@ -2051,45 +3302,89 @@ alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_ create index ix_mprofile_picture_id on mprofile (picture_id); alter table mrole_muser add constraint fk_mrole_muser_mrole foreign key (mrole_roleid) references mrole (roleid); -create index ix_mrole_muser_mrole_roleid on mrole_muser (mrole_roleid); +create index ix_mrole_muser_mrole on mrole_muser (mrole_roleid); alter table mrole_muser add constraint fk_mrole_muser_muser foreign key (muser_userid) references muser (userid); -create index ix_mrole_muser_muser_userid on mrole_muser (muser_userid); +create index ix_mrole_muser_muser on mrole_muser (muser_userid); alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id); create index ix_muser_user_type_id on muser (user_type_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_user foreign key (mail_user_id) references mail_user (id); +create index ix_mail_user_inbox_mail_user on mail_user_inbox (mail_user_id); + +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_box foreign key (mail_box_id) references mail_box (id); +create index ix_mail_user_inbox_mail_box on mail_user_inbox (mail_box_id); + +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_user foreign key (mail_user_id) references mail_user (id); +create index ix_mail_user_outbox_mail_user on mail_user_outbox (mail_user_id); + +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_box foreign key (mail_box_id) references mail_box (id); +create index ix_mail_user_outbox_mail_box on mail_user_outbox (mail_box_id); + alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id); create index ix_c_message_conversation_id on c_message (conversation_id); alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id); create index ix_c_message_user_id on c_message (user_id); -alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_1 foreign key (mnoc_user_user_id) references mnoc_user (user_id); -create index ix_mnoc_user_mnoc_role_mnoc_1 on mnoc_user_mnoc_role (mnoc_user_user_id); +alter table mnoc_user_mnoc_role add constraint fk_mnc_sr_mnc_rl_mnc_sr foreign key (mnoc_user_user_id) references mnoc_user (user_id); +create index ix_mnc_sr_mnc_rl_mnc_sr on mnoc_user_mnoc_role (mnoc_user_user_id); -alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_2 foreign key (mnoc_role_role_id) references mnoc_role (role_id); -create index ix_mnoc_user_mnoc_role_mnoc_2 on mnoc_user_mnoc_role (mnoc_role_role_id); +alter table mnoc_user_mnoc_role add constraint fk_mnc_sr_mnc_rl_mnc_rl foreign key (mnoc_role_role_id) references mnoc_role (role_id); +create index ix_mnc_sr_mnc_rl_mnc_rl on mnoc_user_mnoc_role (mnoc_role_role_id); + +alter table mny_b add constraint fk_mny_b_a_id foreign key (a_id) references mny_a (id); +create index ix_mny_b_a_id on mny_b (a_id); + +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_b foreign key (mny_b_id) references mny_b (id); +create index ix_mny_b_mny_c_mny_b on mny_b_mny_c (mny_b_id); + +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_c foreign key (mny_c_id) references mny_c (id); +create index ix_mny_b_mny_c_mny_c on mny_b_mny_c (mny_c_id); + +alter table subtopics add constraint fk_subtopics_mny_topic_1 foreign key (topic) references mny_topic (id); +create index ix_subtopics_mny_topic_1 on subtopics (topic); + +alter table subtopics add constraint fk_subtopics_mny_topic_2 foreign key (subtopic) references mny_topic (id); +create index ix_subtopics_mny_topic_2 on subtopics (subtopic); alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id); create index ix_mp_role_mp_user_id on mp_role (mp_user_id); -alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_pa_1 foreign key (parent_id) references my_lob_size (id); -create index ix_my_lob_size_join_many_pa_1 on my_lob_size_join_many (parent_id); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid); +create index ix_ms_many_a_many_b_ms_many_a on ms_many_a_many_b (ms_many_a_aid); -alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o__1 foreign key (o_cached_bean_id) references o_cached_bean (id); -create index ix_o_cached_bean_country_o__1 on o_cached_bean_country (o_cached_bean_id); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid); +create index ix_ms_many_a_many_b_ms_many_b on ms_many_a_many_b (ms_many_b_bid); -alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o__2 foreign key (o_country_code) references o_country (code); -create index ix_o_cached_bean_country_o__2 on o_cached_bean_country (o_country_code); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid); +create index ix_ms_many_b_many_a_ms_many_b on ms_many_b_many_a (ms_many_b_bid); -alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cach_1 foreign key (cached_bean_id) references o_cached_bean (id); -create index ix_o_cached_bean_child_cach_1 on o_cached_bean_child (cached_bean_id); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid); +create index ix_ms_many_b_many_a_ms_many_a on ms_many_b_many_a (ms_many_a_aid); + +alter table my_lob_size_join_many add constraint fk_my_lb_sz_jn_mny_prnt_d foreign key (parent_id) references my_lob_size (id); +create index ix_my_lb_sz_jn_mny_prnt_d on my_lob_size_join_many (parent_id); + +alter table o_cached_bean_country add constraint fk_o_cchd_bn_cntry__cchd_bn foreign key (o_cached_bean_id) references o_cached_bean (id); +create index ix_o_cchd_bn_cntry__cchd_bn on o_cached_bean_country (o_cached_bean_id); + +alter table o_cached_bean_country add constraint fk_o_cchd_bn_cntry__cntry foreign key (o_country_code) references o_country (code); +create index ix_o_cchd_bn_cntry__cntry on o_cached_bean_country (o_country_code); + +alter table o_cached_bean_child add constraint fk_o_cchd_bn_chld_cchd_bn_d foreign key (cached_bean_id) references o_cached_bean (id); +create index ix_o_cchd_bn_chld_cchd_bn_d on o_cached_bean_child (cached_bean_id); alter table oengine add constraint fk_oengine_car_id foreign key (car_id) references ocar (id); alter table ogear_box add constraint fk_ogear_box_car_id foreign key (car_id) references ocar (id); +alter table oroad_show_msg add constraint fk_oroad_show_msg_company_id foreign key (company_id) references ocompany (id); + +alter table om_ordered_detail add constraint fk_om_rdrd_dtl_mstr_d foreign key (master_id) references om_ordered_master (id); +create index ix_om_rdrd_dtl_mstr_d on om_ordered_detail (master_id); + alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id); create index ix_o_order_kcustomer_id on o_order (kcustomer_id); @@ -2105,8 +3400,23 @@ create index ix_s_order_items_order_uuid on s_order_items (order_uuid); alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id); create index ix_or_order_ship_order_id on or_order_ship (order_id); +alter table oto_bchild add constraint fk_oto_bchild_master_id foreign key (master_id) references oto_bmaster (id); + alter table oto_child add constraint fk_oto_child_master_id foreign key (master_id) references oto_master (id); +alter table oto_cust_address add constraint fk_ot_cst_ddrss_cstmr_cd foreign key (customer_cid) references oto_cust (cid); + +alter table oto_prime_extra add constraint fk_oto_prime_extra_eid foreign key (eid) references oto_prime (pid); + +alter table oto_th_many add constraint fk_oto_th_many_oto_th_top_id foreign key (oto_th_top_id) references oto_th_top (id); +create index ix_oto_th_many_oto_th_top_id on oto_th_many (oto_th_top_id); + +alter table oto_th_one add constraint fk_oto_th_one_many_id foreign key (many_id) references oto_th_many (id); + +alter table oto_ubprime_extra add constraint fk_oto_ubprime_extra_eid foreign key (eid) references oto_ubprime (pid); + +alter table oto_uprime_extra add constraint fk_oto_uprime_extra_eid foreign key (eid) references oto_uprime (pid); + alter table pfile add constraint fk_pfile_file_content_id foreign key (file_content_id) references pfile_content (id); alter table pfile add constraint fk_pfile_file_content2_id foreign key (file_content2_id) references pfile_content (id); @@ -2118,19 +3428,25 @@ create index ix_pallet_location_zone_sid on pallet_location (zone_sid); alter table parcel_location add constraint fk_parcel_location_parcelid foreign key (parcelid) references parcel (parcelid); -alter table rawinherit_parent_rawinherit_d add constraint fk_rawinherit_parent_rawinh_1 foreign key (rawinherit_parent_id) references rawinherit_parent (id); -create index ix_rawinherit_parent_rawinh_1 on rawinherit_parent_rawinherit_d (rawinherit_parent_id); +alter table rawinherit_parent_rawinherit_d add constraint fk_rwnhrt_prnt_rwnhrt_d_rwn_1 foreign key (rawinherit_parent_id) references rawinherit_parent (id); +create index ix_rwnhrt_prnt_rwnhrt_d_rwn_1 on rawinherit_parent_rawinherit_d (rawinherit_parent_id); -alter table rawinherit_parent_rawinherit_d add constraint fk_rawinherit_parent_rawinh_2 foreign key (rawinherit_data_id) references rawinherit_data (id); -create index ix_rawinherit_parent_rawinh_2 on rawinherit_parent_rawinherit_d (rawinherit_data_id); +alter table rawinherit_parent_rawinherit_d add constraint fk_rwnhrt_prnt_rwnhrt_d_rwn_2 foreign key (rawinherit_data_id) references rawinherit_data (id); +create index ix_rwnhrt_prnt_rwnhrt_d_rwn_2 on rawinherit_parent_rawinherit_d (rawinherit_data_id); -alter table c_participation add constraint fk_c_participation_conversa_1 foreign key (conversation_id) references c_conversation (id); -create index ix_c_participation_conversa_1 on c_participation (conversation_id); +alter table parent_person add constraint fk_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id); +create index ix_parent_person_some_bean_id on parent_person (some_bean_id); + +alter table parent_person add constraint fk_prnt_prsn_prnt_dntfr foreign key (parent_identifier) references grand_parent_person (identifier); +create index ix_prnt_prsn_prnt_dntfr on parent_person (parent_identifier); + +alter table c_participation add constraint fk_c_prtcptn_cnvrstn_d foreign key (conversation_id) references c_conversation (id); +create index ix_c_prtcptn_cnvrstn_d on c_participation (conversation_id); alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id); create index ix_c_participation_user_id on c_participation (user_id); -alter table persistent_file_content add constraint fk_persistent_file_content__1 foreign key (persistent_file_id) references persistent_file (id); +alter table persistent_file_content add constraint fk_prsstnt_fl_cntnt_prsstnt_1 foreign key (persistent_file_id) references persistent_file (id); alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid); create index ix_person_default_address_oid on person (default_address_oid); @@ -2139,25 +3455,28 @@ alter table phones add constraint fk_phones_person_id foreign key (person_id) re create index ix_phones_person_id on phones (person_id); alter table pp_to_ww add constraint fk_pp_to_ww_pp foreign key (pp_id) references pp (id); -create index ix_pp_to_ww_pp_id on pp_to_ww (pp_id); +create index ix_pp_to_ww_pp on pp_to_ww (pp_id); alter table pp_to_ww add constraint fk_pp_to_ww_wview foreign key (ww_id) references wview (id); -create index ix_pp_to_ww_ww_id on pp_to_ww (ww_id); +create index ix_pp_to_ww_wview on pp_to_ww (ww_id); -alter table r_orders add constraint fk_r_orders_rcustomer foreign key (company,customername) references rcustomer (company,name); -create index ix_r_orders_company_custome_1 on r_orders (company,customername); +alter table question add constraint fk_question_groupobjectid foreign key (groupobjectid) references survey_group (id); +create index ix_question_groupobjectid on question (groupobjectid); -alter table resourcefile add constraint fk_resourcefile_parentresou_1 foreign key (parentresourcefileid) references resourcefile (id); -create index ix_resourcefile_parentresou_1 on resourcefile (parentresourcefileid); +alter table r_orders add constraint fk_r_orders_customer foreign key (company,customername) references rcustomer (company,name); +create index ix_r_orders_customer on r_orders (company,customername); + +alter table resourcefile add constraint fk_rsrcfl_prntrsrcfld foreign key (parentresourcefileid) references resourcefile (id); +create index ix_rsrcfl_prntrsrcfld on resourcefile (parentresourcefileid); alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id); create index ix_mt_role_tenant_id on mt_role (tenant_id); alter table mt_role_permission add constraint fk_mt_role_permission_mt_role foreign key (mt_role_id) references mt_role (id); -create index ix_mt_role_permission_mt_ro_1 on mt_role_permission (mt_role_id); +create index ix_mt_role_permission_mt_role on mt_role_permission (mt_role_id); -alter table mt_role_permission add constraint fk_mt_role_permission_mt_pe_2 foreign key (mt_permission_id) references mt_permission (id); -create index ix_mt_role_permission_mt_pe_2 on mt_role_permission (mt_permission_id); +alter table mt_role_permission add constraint fk_mt_rl_prmssn_mt_prmssn foreign key (mt_permission_id) references mt_permission (id); +create index ix_mt_rl_prmssn_mt_prmssn on mt_role_permission (mt_permission_id); alter table f_second add constraint fk_f_second_first foreign key (first) references f_first (id); @@ -2167,20 +3486,25 @@ create index ix_section_article_id on section (article_id); alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id); create index ix_self_parent_parent_id on self_parent (parent_id); -alter table self_ref_customer add constraint fk_self_ref_customer_referr_1 foreign key (referred_by_id) references self_ref_customer (id); -create index ix_self_ref_customer_referr_1 on self_ref_customer (referred_by_id); +alter table self_ref_customer add constraint fk_slf_rf_cstmr_rfrrd_by_d foreign key (referred_by_id) references self_ref_customer (id); +create index ix_slf_rf_cstmr_rfrrd_by_d on self_ref_customer (referred_by_id); alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id); create index ix_self_ref_example_parent_id on self_ref_example (parent_id); -alter table stockforecast add constraint fk_stockforecast_inner_repo_1 foreign key (inner_report_id) references inner_report (id); -create index ix_stockforecast_inner_repo_1 on stockforecast (inner_report_id); +alter table stockforecast add constraint fk_stckfrcst_nnr_rprt_d foreign key (inner_report_id) references inner_report (id); +create index ix_stckfrcst_nnr_rprt_d on stockforecast (inner_report_id); alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id); create index ix_sub_section_section_id on sub_section (section_id); -alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_name_1 foreign key (master_id) references t_atable_thatisrelatively (id); -create index ix_t_detail_with_other_name_1 on t_detail_with_other_namexxxyy (master_id); +alter table tevent_many add constraint fk_tevent_many_event_id foreign key (event_id) references tevent_one (id); +create index ix_tevent_many_event_id on tevent_many (event_id); + +alter table tevent_one add constraint fk_tevent_one_event_id foreign key (event_id) references tevent (id); + +alter table t_detail_with_other_namexxxyy add constraint fk_t_dtl_wth_thr_nmxxxyy_ms_1 foreign key (master_id) references t_atable_thatisrelatively (id); +create index ix_t_dtl_wth_thr_nmxxxyy_ms_1 on t_detail_with_other_namexxxyy (master_id); alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id); create index ix_ts_detail_two_master_id on ts_detail_two (master_id); @@ -2216,12 +3540,12 @@ create index ix_em_user_role_user_id on em_user_role (user_id); alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id); create index ix_em_user_role_role_id on em_user_role (role_id); -alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id); -create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); - alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id); create index ix_vehicle_car_ref_id on vehicle (car_ref_id); +alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id); +create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); + alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id); create index ix_vehicle_driver_vehicle_id on vehicle_driver (vehicle_id); @@ -2231,11 +3555,11 @@ create index ix_vehicle_driver_address_id on vehicle_driver (address_id); alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id); create index ix_warehouses_officezoneid on warehouses (officezoneid); -alter table warehousesshippingzones add constraint fk_warehousesshippingzones__1 foreign key (warehouseid) references warehouses (id); -create index ix_warehousesshippingzones__1 on warehousesshippingzones (warehouseid); +alter table warehousesshippingzones add constraint fk_wrhssshppngzns_wrhss foreign key (warehouseid) references warehouses (id); +create index ix_wrhssshppngzns_wrhss on warehousesshippingzones (warehouseid); -alter table warehousesshippingzones add constraint fk_warehousesshippingzones__2 foreign key (shippingzoneid) references zones (id); -create index ix_warehousesshippingzones__2 on warehousesshippingzones (shippingzoneid); +alter table warehousesshippingzones add constraint fk_wrhssshppngzns_zns foreign key (shippingzoneid) references zones (id); +create index ix_wrhssshppngzns_zns on warehousesshippingzones (shippingzoneid); alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id); create index ix_sa_wheel_tire on sa_wheel (tire); @@ -2243,6 +3567,12 @@ create index ix_sa_wheel_tire on sa_wheel (tire); alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id); create index ix_sa_wheel_car on sa_wheel (car); +alter table g_who_props_otm add constraint fk_g_wh_prps_tm_wh_crtd_d foreign key (who_created_id) references g_user (id); +create index ix_g_wh_prps_tm_wh_crtd_d on g_who_props_otm (who_created_id); + +alter table g_who_props_otm add constraint fk_g_wh_prps_tm_wh_mdfd_d foreign key (who_modified_id) references g_user (id); +create index ix_g_wh_prps_tm_wh_mdfd_d on g_who_props_otm (who_modified_id); + alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id); create index ix_with_zero_parent_id on with_zero (parent_id); diff --git a/src/test/ddl-review/oracle-drop-all.sql b/src/test/ddl-review/oracle-drop-all.sql index 1c863ed7b..b621e55a1 100644 --- a/src/test/ddl-review/oracle-drop-all.sql +++ b/src/test/ddl-review/oracle-drop-all.sql @@ -1,45 +1,80 @@ alter table bar drop constraint fk_bar_foo_id; drop index ix_bar_foo_id; +alter table addr drop constraint fk_addr_employee_id; +drop index ix_addr_employee_id; + alter table o_address drop constraint fk_o_address_country_code; drop index ix_o_address_country_code; -alter table animals drop constraint fk_animals_shelter_id; -drop index ix_animals_shelter_id; +alter table album drop constraint fk_album_cover_id; -alter table attribute drop constraint fk_attribute_attribute_hold_1; -drop index ix_attribute_attribute_hold_1; +alter table animal drop constraint fk_animal_shelter_id; +drop index ix_animal_shelter_id; + +alter table attribute drop constraint fk_attrbt_ttrbt_hldr_d; +drop index ix_attrbt_ttrbt_hldr_d; alter table bbookmark drop constraint fk_bbookmark_user_id; drop index ix_bbookmark_user_id; +alter table bsite_user drop constraint fk_bsite_user_site_id; +drop index ix_bsite_user_site_id; + +alter table bsite_user drop constraint fk_bsite_user_user_id; +drop index ix_bsite_user_user_id; + +alter table bsite_user_b drop constraint fk_bsite_user_b_site; +drop index ix_bsite_user_b_site; + +alter table bsite_user_b drop constraint fk_bsite_user_b_usr; +drop index ix_bsite_user_b_usr; + +alter table bsite_user_c drop constraint fk_bsite_user_c_site_uid; +drop index ix_bsite_user_c_site_uid; + +alter table bsite_user_c drop constraint fk_bsite_user_c_user_uid; +drop index ix_bsite_user_c_user_uid; + alter table drel_booking drop constraint fk_drel_booking_agent_invoice; -alter table drel_booking drop constraint fk_drel_booking_client_invo_2; +alter table drel_booking drop constraint fk_drl_bkng_clnt_nvc; -alter table ckey_detail drop constraint fk_ckey_detail_ckey_parent; -drop index ix_ckey_detail_one_key_two__1; +alter table ckey_detail drop constraint fk_ckey_detail_parent; +drop index ix_ckey_detail_parent; alter table ckey_parent drop constraint fk_ckey_parent_assoc_id; drop index ix_ckey_parent_assoc_id; -alter table calculation_result drop constraint fk_calculation_result_produ_1; -drop index ix_calculation_result_produ_1; +alter table calculation_result drop constraint fk_clcltn_rslt_prdct_cnfgrt_1; +drop index ix_clcltn_rslt_prdct_cnfgrt_1; -alter table calculation_result drop constraint fk_calculation_result_group_2; -drop index ix_calculation_result_group_2; +alter table calculation_result drop constraint fk_clcltn_rslt_grp_cnfgrtn_d; +drop index ix_clcltn_rslt_grp_cnfgrtn_d; -alter table sp_car_car_wheels drop constraint fk_sp_car_car_wheels_sp_car_1; -drop index ix_sp_car_car_wheels_car; +alter table sp_car_car_wheels drop constraint fk_sp_cr_cr_whls_sp_cr_cr; +drop index ix_sp_cr_cr_whls_sp_cr_cr; -alter table sp_car_car_wheels drop constraint fk_sp_car_car_wheels_sp_car_2; -drop index ix_sp_car_car_wheels_wheel; +alter table sp_car_car_wheels drop constraint fk_sp_cr_cr_whls_sp_cr_whl; +drop index ix_sp_cr_cr_whls_sp_cr_whl; + +alter table car_accessory drop constraint fk_car_accessory_fuse_id; +drop index ix_car_accessory_fuse_id; alter table car_accessory drop constraint fk_car_accessory_car_id; drop index ix_car_accessory_car_id; -alter table configuration drop constraint fk_configuration_configurat_1; -drop index ix_configuration_configurat_1; +alter table category drop constraint fk_category_surveyobjectid; +drop index ix_category_surveyobjectid; + +alter table child_person drop constraint fk_child_person_some_bean_id; +drop index ix_child_person_some_bean_id; + +alter table child_person drop constraint fk_chld_prsn_prnt_dntfr; +drop index ix_chld_prsn_prnt_dntfr; + +alter table configuration drop constraint fk_cnfgrtn_cnfgrtns_d; +drop index ix_cnfgrtn_cnfgrtns_d; alter table contact drop constraint fk_contact_customer_id; drop index ix_contact_customer_id; @@ -53,11 +88,60 @@ drop index ix_contact_note_contact_id; alter table c_conversation drop constraint fk_c_conversation_group_id; drop index ix_c_conversation_group_id; -alter table o_customer drop constraint fk_o_customer_billing_addre_1; -drop index ix_o_customer_billing_addre_1; +alter table o_customer drop constraint fk_o_cstmr_bllng_ddrss_d; +drop index ix_o_cstmr_bllng_ddrss_d; -alter table o_customer drop constraint fk_o_customer_shipping_addr_2; -drop index ix_o_customer_shipping_addr_2; +alter table o_customer drop constraint fk_o_cstmr_shppng_ddrss_d; +drop index ix_o_cstmr_shppng_ddrss_d; + +alter table dcredit_drol drop constraint fk_dcredit_drol_dcredit; +drop index ix_dcredit_drol_dcredit; + +alter table dcredit_drol drop constraint fk_dcredit_drol_drol; +drop index ix_dcredit_drol_drol; + +alter table drot_drol drop constraint fk_drot_drol_drot; +drop index ix_drot_drol_drot; + +alter table drot_drol drop constraint fk_drot_drol_drol; +drop index ix_drot_drol_drol; + +alter table dfk_cascade drop constraint fk_dfk_cascade_one_id; +drop index ix_dfk_cascade_one_id; + +alter table dfk_set_null drop constraint fk_dfk_set_null_one_id; +drop index ix_dfk_set_null_one_id; + +alter table doc drop constraint fk_doc_id; + +alter table doc_link drop constraint fk_doc_link_doc; +drop index ix_doc_link_doc; + +alter table doc_link drop constraint fk_doc_link_link; +drop index ix_doc_link_link; + +alter table document drop constraint fk_document_id; + +alter table document drop constraint fk_document_organisation_id; +drop index ix_document_organisation_id; + +alter table document_draft drop constraint fk_dcmnt_drft_rgnstn_d; +drop index ix_dcmnt_drft_rgnstn_d; + +alter table document_media drop constraint fk_document_media_document_id; +drop index ix_document_media_document_id; + +alter table document_media_draft drop constraint fk_dcmnt_md_drft_dcmnt_d; +drop index ix_dcmnt_md_drft_dcmnt_d; + +alter table ebasic_json_map_detail drop constraint fk_ebsc_jsn_mp_dtl_wnr_d; +drop index ix_ebsc_jsn_mp_dtl_wnr_d; + +alter table ebasic_no_sdchild drop constraint fk_ebasic_no_sdchild_owner_id; +drop index ix_ebasic_no_sdchild_owner_id; + +alter table ebasic_sdchild drop constraint fk_ebasic_sdchild_owner_id; +drop index ix_ebasic_sdchild_owner_id; alter table eemb_inner drop constraint fk_eemb_inner_outer_id; drop index ix_eemb_inner_outer_id; @@ -65,8 +149,8 @@ drop index ix_eemb_inner_outer_id; alter table einvoice drop constraint fk_einvoice_person_id; drop index ix_einvoice_person_id; -alter table enull_collection_detail drop constraint fk_enull_collection_detail__1; -drop index ix_enull_collection_detail__1; +alter table enull_collection_detail drop constraint fk_enll_cllctn_dtl_nll_cllc_1; +drop index ix_enll_cllctn_dtl_nll_cllc_1; alter table eopt_one_a drop constraint fk_eopt_one_a_b_id; drop index ix_eopt_one_a_b_id; @@ -74,12 +158,66 @@ drop index ix_eopt_one_a_b_id; alter table eopt_one_b drop constraint fk_eopt_one_b_c_id; drop index ix_eopt_one_b_c_id; -alter table evanilla_collection_detail drop constraint fk_evanilla_collection_deta_1; -drop index ix_evanilla_collection_deta_1; +alter table esoft_del_book drop constraint fk_esoft_del_book_lend_by_id; +drop index ix_esoft_del_book_lend_by_id; + +alter table esoft_del_book_esoft_del_user drop constraint fk_esft_dl_bk_sft_dl_sr_sft_1; +drop index ix_esft_dl_bk_sft_dl_sr_sft_1; + +alter table esoft_del_book_esoft_del_user drop constraint fk_esft_dl_bk_sft_dl_sr_sft_2; +drop index ix_esft_dl_bk_sft_dl_sr_sft_2; + +alter table esoft_del_down drop constraint fk_esft_dl_dwn_sft_dl_md_d; +drop index ix_esft_dl_dwn_sft_dl_md_d; + +alter table esoft_del_mid drop constraint fk_esoft_del_mid_top_id; +drop index ix_esoft_del_mid_top_id; + +alter table esoft_del_mid drop constraint fk_esoft_del_mid_up_id; +drop index ix_esoft_del_mid_up_id; + +alter table esoft_del_role_esoft_del_user drop constraint fk_esft_dl_rl_sft_dl_sr_sft_1; +drop index ix_esft_dl_rl_sft_dl_sr_sft_1; + +alter table esoft_del_role_esoft_del_user drop constraint fk_esft_dl_rl_sft_dl_sr_sft_2; +drop index ix_esft_dl_rl_sft_dl_sr_sft_2; + +alter table esoft_del_user_esoft_del_role drop constraint fk_esft_dl_sr_sft_dl_rl_sft_1; +drop index ix_esft_dl_sr_sft_dl_rl_sft_1; + +alter table esoft_del_user_esoft_del_role drop constraint fk_esft_dl_sr_sft_dl_rl_sft_2; +drop index ix_esft_dl_sr_sft_dl_rl_sft_2; + +alter table rawinherit_uncle drop constraint fk_rawinherit_uncle_parent_id; +drop index ix_rawinherit_uncle_parent_id; + +alter table evanilla_collection_detail drop constraint fk_evnll_cllctn_dtl_vnll_cl_1; +drop index ix_evnll_cllctn_dtl_vnll_cl_1; alter table td_child drop constraint fk_td_child_parent_id; drop index ix_td_child_parent_id; +alter table empl drop constraint fk_empl_default_address_id; +drop index ix_empl_default_address_id; + +alter table grand_parent_person drop constraint fk_grnd_prnt_prsn_sm_bn_d; +drop index ix_grnd_prnt_prsn_sm_bn_d; + +alter table survey_group drop constraint fk_srvy_grp_ctgrybjctd; +drop index ix_srvy_grp_ctgrybjctd; + +alter table hx_link_doc drop constraint fk_hx_link_doc_hx_link; +drop index ix_hx_link_doc_hx_link; + +alter table hx_link_doc drop constraint fk_hx_link_doc_he_doc; +drop index ix_hx_link_doc_he_doc; + +alter table hi_link_doc drop constraint fk_hi_link_doc_hi_link; +drop index ix_hi_link_doc_hi_link; + +alter table hi_link_doc drop constraint fk_hi_link_doc_hi_doc; +drop index ix_hi_link_doc_hi_doc; + alter table imrelated drop constraint fk_imrelated_owner_id; drop index ix_imrelated_owner_id; @@ -93,46 +231,59 @@ alter table inner_report drop constraint fk_inner_report_forecast_id; alter table drel_invoice drop constraint fk_drel_invoice_booking; drop index ix_drel_invoice_booking; -alter table item drop constraint fk_item_type; -drop index ix_item_customer_type; +alter table item drop constraint fk_item_etype; +drop index ix_item_etype; -alter table item drop constraint fk_item_region; -drop index ix_item_customer_region; +alter table item drop constraint fk_item_eregion; +drop index ix_item_eregion; + +alter table trainer_monkey drop constraint fk_trainer_monkey_trainer; + +alter table trainer_monkey drop constraint fk_trainer_monkey_monkey; + +alter table troop_monkey drop constraint fk_troop_monkey_troop; + +alter table troop_monkey drop constraint fk_troop_monkey_monkey; + +alter table l2_cldf_reset_bean_child drop constraint fk_l2_cldf_rst_bn_chld_prnt_d; +drop index ix_l2_cldf_rst_bn_chld_prnt_d; alter table level1_level4 drop constraint fk_level1_level4_level1; -drop index ix_level1_level4_level1_id; +drop index ix_level1_level4_level1; alter table level1_level4 drop constraint fk_level1_level4_level4; -drop index ix_level1_level4_level4_id; +drop index ix_level1_level4_level4; alter table level1_level2 drop constraint fk_level1_level2_level1; -drop index ix_level1_level2_level1_id; +drop index ix_level1_level2_level1; alter table level1_level2 drop constraint fk_level1_level2_level2; -drop index ix_level1_level2_level2_id; +drop index ix_level1_level2_level2; alter table level2_level3 drop constraint fk_level2_level3_level2; -drop index ix_level2_level3_level2_id; +drop index ix_level2_level3_level2; alter table level2_level3 drop constraint fk_level2_level3_level3; -drop index ix_level2_level3_level3_id; +drop index ix_level2_level3_level3; -alter table la_attr_value_attribute drop constraint fk_la_attr_value_attribute__1; -drop index ix_la_attr_value_attribute__1; +alter table link drop constraint fk_link_id; -alter table la_attr_value_attribute drop constraint fk_la_attr_value_attribute__2; -drop index ix_la_attr_value_attribute__2; +alter table la_attr_value_attribute drop constraint fk_l_ttr_vl_ttrbt_l_ttr_vl; +drop index ix_l_ttr_vl_ttrbt_l_ttr_vl; + +alter table la_attr_value_attribute drop constraint fk_l_ttr_vl_ttrbt_ttrbt; +drop index ix_l_ttr_vl_ttrbt_ttrbt; alter table mprinter drop constraint fk_mprinter_current_state_id; drop index ix_mprinter_current_state_id; alter table mprinter drop constraint fk_mprinter_last_swap_cyan_id; -alter table mprinter drop constraint fk_mprinter_last_swap_magen_3; +alter table mprinter drop constraint fk_mprntr_lst_swp_mgnt_d; -alter table mprinter drop constraint fk_mprinter_last_swap_yello_4; +alter table mprinter drop constraint fk_mprntr_lst_swp_yllw_d; -alter table mprinter drop constraint fk_mprinter_last_swap_black_5; +alter table mprinter drop constraint fk_mprntr_lst_swp_blck_d; alter table mprinter_state drop constraint fk_mprinter_state_printer_id; drop index ix_mprinter_state_printer_id; @@ -141,45 +292,89 @@ alter table mprofile drop constraint fk_mprofile_picture_id; drop index ix_mprofile_picture_id; alter table mrole_muser drop constraint fk_mrole_muser_mrole; -drop index ix_mrole_muser_mrole_roleid; +drop index ix_mrole_muser_mrole; alter table mrole_muser drop constraint fk_mrole_muser_muser; -drop index ix_mrole_muser_muser_userid; +drop index ix_mrole_muser_muser; alter table muser drop constraint fk_muser_user_type_id; drop index ix_muser_user_type_id; +alter table mail_user_inbox drop constraint fk_mail_user_inbox_mail_user; +drop index ix_mail_user_inbox_mail_user; + +alter table mail_user_inbox drop constraint fk_mail_user_inbox_mail_box; +drop index ix_mail_user_inbox_mail_box; + +alter table mail_user_outbox drop constraint fk_mail_user_outbox_mail_user; +drop index ix_mail_user_outbox_mail_user; + +alter table mail_user_outbox drop constraint fk_mail_user_outbox_mail_box; +drop index ix_mail_user_outbox_mail_box; + alter table c_message drop constraint fk_c_message_conversation_id; drop index ix_c_message_conversation_id; alter table c_message drop constraint fk_c_message_user_id; drop index ix_c_message_user_id; -alter table mnoc_user_mnoc_role drop constraint fk_mnoc_user_mnoc_role_mnoc_1; -drop index ix_mnoc_user_mnoc_role_mnoc_1; +alter table mnoc_user_mnoc_role drop constraint fk_mnc_sr_mnc_rl_mnc_sr; +drop index ix_mnc_sr_mnc_rl_mnc_sr; -alter table mnoc_user_mnoc_role drop constraint fk_mnoc_user_mnoc_role_mnoc_2; -drop index ix_mnoc_user_mnoc_role_mnoc_2; +alter table mnoc_user_mnoc_role drop constraint fk_mnc_sr_mnc_rl_mnc_rl; +drop index ix_mnc_sr_mnc_rl_mnc_rl; + +alter table mny_b drop constraint fk_mny_b_a_id; +drop index ix_mny_b_a_id; + +alter table mny_b_mny_c drop constraint fk_mny_b_mny_c_mny_b; +drop index ix_mny_b_mny_c_mny_b; + +alter table mny_b_mny_c drop constraint fk_mny_b_mny_c_mny_c; +drop index ix_mny_b_mny_c_mny_c; + +alter table subtopics drop constraint fk_subtopics_mny_topic_1; +drop index ix_subtopics_mny_topic_1; + +alter table subtopics drop constraint fk_subtopics_mny_topic_2; +drop index ix_subtopics_mny_topic_2; alter table mp_role drop constraint fk_mp_role_mp_user_id; drop index ix_mp_role_mp_user_id; -alter table my_lob_size_join_many drop constraint fk_my_lob_size_join_many_pa_1; -drop index ix_my_lob_size_join_many_pa_1; +alter table ms_many_a_many_b drop constraint fk_ms_many_a_many_b_ms_many_a; +drop index ix_ms_many_a_many_b_ms_many_a; -alter table o_cached_bean_country drop constraint fk_o_cached_bean_country_o__1; -drop index ix_o_cached_bean_country_o__1; +alter table ms_many_a_many_b drop constraint fk_ms_many_a_many_b_ms_many_b; +drop index ix_ms_many_a_many_b_ms_many_b; -alter table o_cached_bean_country drop constraint fk_o_cached_bean_country_o__2; -drop index ix_o_cached_bean_country_o__2; +alter table ms_many_b_many_a drop constraint fk_ms_many_b_many_a_ms_many_b; +drop index ix_ms_many_b_many_a_ms_many_b; -alter table o_cached_bean_child drop constraint fk_o_cached_bean_child_cach_1; -drop index ix_o_cached_bean_child_cach_1; +alter table ms_many_b_many_a drop constraint fk_ms_many_b_many_a_ms_many_a; +drop index ix_ms_many_b_many_a_ms_many_a; + +alter table my_lob_size_join_many drop constraint fk_my_lb_sz_jn_mny_prnt_d; +drop index ix_my_lb_sz_jn_mny_prnt_d; + +alter table o_cached_bean_country drop constraint fk_o_cchd_bn_cntry__cchd_bn; +drop index ix_o_cchd_bn_cntry__cchd_bn; + +alter table o_cached_bean_country drop constraint fk_o_cchd_bn_cntry__cntry; +drop index ix_o_cchd_bn_cntry__cntry; + +alter table o_cached_bean_child drop constraint fk_o_cchd_bn_chld_cchd_bn_d; +drop index ix_o_cchd_bn_chld_cchd_bn_d; alter table oengine drop constraint fk_oengine_car_id; alter table ogear_box drop constraint fk_ogear_box_car_id; +alter table oroad_show_msg drop constraint fk_oroad_show_msg_company_id; + +alter table om_ordered_detail drop constraint fk_om_rdrd_dtl_mstr_d; +drop index ix_om_rdrd_dtl_mstr_d; + alter table o_order drop constraint fk_o_order_kcustomer_id; drop index ix_o_order_kcustomer_id; @@ -195,8 +390,23 @@ drop index ix_s_order_items_order_uuid; alter table or_order_ship drop constraint fk_or_order_ship_order_id; drop index ix_or_order_ship_order_id; +alter table oto_bchild drop constraint fk_oto_bchild_master_id; + alter table oto_child drop constraint fk_oto_child_master_id; +alter table oto_cust_address drop constraint fk_ot_cst_ddrss_cstmr_cd; + +alter table oto_prime_extra drop constraint fk_oto_prime_extra_eid; + +alter table oto_th_many drop constraint fk_oto_th_many_oto_th_top_id; +drop index ix_oto_th_many_oto_th_top_id; + +alter table oto_th_one drop constraint fk_oto_th_one_many_id; + +alter table oto_ubprime_extra drop constraint fk_oto_ubprime_extra_eid; + +alter table oto_uprime_extra drop constraint fk_oto_uprime_extra_eid; + alter table pfile drop constraint fk_pfile_file_content_id; alter table pfile drop constraint fk_pfile_file_content2_id; @@ -208,19 +418,25 @@ drop index ix_pallet_location_zone_sid; alter table parcel_location drop constraint fk_parcel_location_parcelid; -alter table rawinherit_parent_rawinherit_d drop constraint fk_rawinherit_parent_rawinh_1; -drop index ix_rawinherit_parent_rawinh_1; +alter table rawinherit_parent_rawinherit_d drop constraint fk_rwnhrt_prnt_rwnhrt_d_rwn_1; +drop index ix_rwnhrt_prnt_rwnhrt_d_rwn_1; -alter table rawinherit_parent_rawinherit_d drop constraint fk_rawinherit_parent_rawinh_2; -drop index ix_rawinherit_parent_rawinh_2; +alter table rawinherit_parent_rawinherit_d drop constraint fk_rwnhrt_prnt_rwnhrt_d_rwn_2; +drop index ix_rwnhrt_prnt_rwnhrt_d_rwn_2; -alter table c_participation drop constraint fk_c_participation_conversa_1; -drop index ix_c_participation_conversa_1; +alter table parent_person drop constraint fk_parent_person_some_bean_id; +drop index ix_parent_person_some_bean_id; + +alter table parent_person drop constraint fk_prnt_prsn_prnt_dntfr; +drop index ix_prnt_prsn_prnt_dntfr; + +alter table c_participation drop constraint fk_c_prtcptn_cnvrstn_d; +drop index ix_c_prtcptn_cnvrstn_d; alter table c_participation drop constraint fk_c_participation_user_id; drop index ix_c_participation_user_id; -alter table persistent_file_content drop constraint fk_persistent_file_content__1; +alter table persistent_file_content drop constraint fk_prsstnt_fl_cntnt_prsstnt_1; alter table person drop constraint fk_person_default_address_oid; drop index ix_person_default_address_oid; @@ -229,25 +445,28 @@ alter table phones drop constraint fk_phones_person_id; drop index ix_phones_person_id; alter table pp_to_ww drop constraint fk_pp_to_ww_pp; -drop index ix_pp_to_ww_pp_id; +drop index ix_pp_to_ww_pp; alter table pp_to_ww drop constraint fk_pp_to_ww_wview; -drop index ix_pp_to_ww_ww_id; +drop index ix_pp_to_ww_wview; -alter table r_orders drop constraint fk_r_orders_rcustomer; -drop index ix_r_orders_company_custome_1; +alter table question drop constraint fk_question_groupobjectid; +drop index ix_question_groupobjectid; -alter table resourcefile drop constraint fk_resourcefile_parentresou_1; -drop index ix_resourcefile_parentresou_1; +alter table r_orders drop constraint fk_r_orders_customer; +drop index ix_r_orders_customer; + +alter table resourcefile drop constraint fk_rsrcfl_prntrsrcfld; +drop index ix_rsrcfl_prntrsrcfld; alter table mt_role drop constraint fk_mt_role_tenant_id; drop index ix_mt_role_tenant_id; alter table mt_role_permission drop constraint fk_mt_role_permission_mt_role; -drop index ix_mt_role_permission_mt_ro_1; +drop index ix_mt_role_permission_mt_role; -alter table mt_role_permission drop constraint fk_mt_role_permission_mt_pe_2; -drop index ix_mt_role_permission_mt_pe_2; +alter table mt_role_permission drop constraint fk_mt_rl_prmssn_mt_prmssn; +drop index ix_mt_rl_prmssn_mt_prmssn; alter table f_second drop constraint fk_f_second_first; @@ -257,20 +476,25 @@ drop index ix_section_article_id; alter table self_parent drop constraint fk_self_parent_parent_id; drop index ix_self_parent_parent_id; -alter table self_ref_customer drop constraint fk_self_ref_customer_referr_1; -drop index ix_self_ref_customer_referr_1; +alter table self_ref_customer drop constraint fk_slf_rf_cstmr_rfrrd_by_d; +drop index ix_slf_rf_cstmr_rfrrd_by_d; alter table self_ref_example drop constraint fk_self_ref_example_parent_id; drop index ix_self_ref_example_parent_id; -alter table stockforecast drop constraint fk_stockforecast_inner_repo_1; -drop index ix_stockforecast_inner_repo_1; +alter table stockforecast drop constraint fk_stckfrcst_nnr_rprt_d; +drop index ix_stckfrcst_nnr_rprt_d; alter table sub_section drop constraint fk_sub_section_section_id; drop index ix_sub_section_section_id; -alter table t_detail_with_other_namexxxyy drop constraint fk_t_detail_with_other_name_1; -drop index ix_t_detail_with_other_name_1; +alter table tevent_many drop constraint fk_tevent_many_event_id; +drop index ix_tevent_many_event_id; + +alter table tevent_one drop constraint fk_tevent_one_event_id; + +alter table t_detail_with_other_namexxxyy drop constraint fk_t_dtl_wth_thr_nmxxxyy_ms_1; +drop index ix_t_dtl_wth_thr_nmxxxyy_ms_1; alter table ts_detail_two drop constraint fk_ts_detail_two_master_id; drop index ix_ts_detail_two_master_id; @@ -306,12 +530,12 @@ drop index ix_em_user_role_user_id; alter table em_user_role drop constraint fk_em_user_role_role_id; drop index ix_em_user_role_role_id; -alter table vehicle drop constraint fk_vehicle_truck_ref_id; -drop index ix_vehicle_truck_ref_id; - alter table vehicle drop constraint fk_vehicle_car_ref_id; drop index ix_vehicle_car_ref_id; +alter table vehicle drop constraint fk_vehicle_truck_ref_id; +drop index ix_vehicle_truck_ref_id; + alter table vehicle_driver drop constraint fk_vehicle_driver_vehicle_id; drop index ix_vehicle_driver_vehicle_id; @@ -321,11 +545,11 @@ drop index ix_vehicle_driver_address_id; alter table warehouses drop constraint fk_warehouses_officezoneid; drop index ix_warehouses_officezoneid; -alter table warehousesshippingzones drop constraint fk_warehousesshippingzones__1; -drop index ix_warehousesshippingzones__1; +alter table warehousesshippingzones drop constraint fk_wrhssshppngzns_wrhss; +drop index ix_wrhssshppngzns_wrhss; -alter table warehousesshippingzones drop constraint fk_warehousesshippingzones__2; -drop index ix_warehousesshippingzones__2; +alter table warehousesshippingzones drop constraint fk_wrhssshppngzns_zns; +drop index ix_wrhssshppngzns_zns; alter table sa_wheel drop constraint fk_sa_wheel_tire; drop index ix_sa_wheel_tire; @@ -333,6 +557,12 @@ drop index ix_sa_wheel_tire; alter table sa_wheel drop constraint fk_sa_wheel_car; drop index ix_sa_wheel_car; +alter table g_who_props_otm drop constraint fk_g_wh_prps_tm_wh_crtd_d; +drop index ix_g_wh_prps_tm_wh_crtd_d; + +alter table g_who_props_otm drop constraint fk_g_wh_prps_tm_wh_mdfd_d; +drop index ix_g_wh_prps_tm_wh_mdfd_d; + alter table with_zero drop constraint fk_with_zero_parent_id; drop index ix_with_zero_parent_id; @@ -345,14 +575,20 @@ drop sequence bar_seq; drop table oto_account cascade constraints purge; drop sequence oto_account_seq; -drop table o_address cascade constraints purge; -drop sequence o_address_seq; +drop table addr cascade constraints purge; +drop sequence addr_seq; drop table address cascade constraints purge; drop sequence address_seq; -drop table animals cascade constraints purge; -drop sequence animals_seq; +drop table o_address cascade constraints purge; +drop sequence o_address_seq; + +drop table album cascade constraints purge; +drop sequence album_seq; + +drop table animal cascade constraints purge; +drop sequence animal_seq; drop table animal_shelter cascade constraints purge; drop sequence animal_shelter_seq; @@ -378,6 +614,16 @@ drop sequence bbookmark_user_seq; drop table bsimple_with_gen cascade constraints purge; drop sequence bsimple_with_gen_seq; +drop table bsite cascade constraints purge; + +drop table bsite_user cascade constraints purge; + +drop table bsite_user_b cascade constraints purge; + +drop table bsite_user_c cascade constraints purge; + +drop table buser cascade constraints purge; + drop table bwith_qident cascade constraints purge; drop sequence bwith_qident_seq; @@ -390,6 +636,9 @@ drop sequence bean_with_time_zone_seq; drop table drel_booking cascade constraints purge; drop sequence drel_booking_seq; +drop table cinh_root cascade constraints purge; +drop sequence cinh_root_seq; + drop table ckey_assoc cascade constraints purge; drop sequence ckey_assoc_seq; @@ -414,6 +663,15 @@ drop table sp_car_car_wheels cascade constraints purge; drop table car_accessory cascade constraints purge; drop sequence car_accessory_seq; +drop table car_fuse cascade constraints purge; +drop sequence car_fuse_seq; + +drop table category cascade constraints purge; +drop sequence category_seq; + +drop table child_person cascade constraints purge; +drop sequence child_person_seq; + drop table configuration cascade constraints purge; drop sequence configuration_seq; @@ -434,21 +692,86 @@ drop sequence c_conversation_seq; drop table o_country cascade constraints purge; +drop table cover cascade constraints purge; +drop sequence cover_seq; + drop table o_customer cascade constraints purge; drop sequence o_customer_seq; +drop table dcredit cascade constraints purge; +drop sequence dcredit_seq; + +drop table dcredit_drol cascade constraints purge; + drop table dexh_entity cascade constraints purge; drop sequence dexh_entity_seq; drop table dperson cascade constraints purge; drop sequence dperson_seq; +drop table drol cascade constraints purge; +drop sequence drol_seq; + +drop table drot cascade constraints purge; +drop sequence drot_seq; + +drop table drot_drol cascade constraints purge; + drop table rawinherit_data cascade constraints purge; drop sequence rawinherit_data_seq; +drop table dfk_cascade cascade constraints purge; +drop sequence dfk_cascade_seq; + +drop table dfk_cascade_one cascade constraints purge; +drop sequence dfk_cascade_one_seq; + +drop table dfk_none cascade constraints purge; +drop sequence dfk_none_seq; + +drop table dfk_none_via_join cascade constraints purge; +drop sequence dfk_none_via_join_seq; + +drop table dfk_one cascade constraints purge; +drop sequence dfk_one_seq; + +drop table dfk_set_null cascade constraints purge; +drop sequence dfk_set_null_seq; + +drop table doc cascade constraints purge; +drop sequence doc_seq; + +drop table doc_link cascade constraints purge; + +drop table doc_link_draft cascade constraints purge; + +drop table doc_draft cascade constraints purge; +drop sequence doc_draft_seq; + +drop table document cascade constraints purge; +drop sequence document_seq; + +drop table document_draft cascade constraints purge; +drop sequence document_draft_seq; + +drop table document_media cascade constraints purge; +drop sequence document_media_seq; + +drop table document_media_draft cascade constraints purge; +drop sequence document_media_draft_seq; + +drop table earray_bean cascade constraints purge; +drop sequence earray_bean_seq; + +drop table earray_set_bean cascade constraints purge; +drop sequence earray_set_bean_seq; + drop table e_basic cascade constraints purge; drop sequence e_basic_seq; +drop table ebasic_change_log cascade constraints purge; +drop sequence ebasic_change_log_seq; + drop table ebasic_clob cascade constraints purge; drop sequence ebasic_clob_seq; @@ -466,6 +789,15 @@ drop sequence e_basicenc_bin_seq; drop table e_basic_enum_id cascade constraints purge; +drop table e_basic_eni cascade constraints purge; +drop sequence e_basic_eni_seq; + +drop table ebasic_hstore cascade constraints purge; +drop sequence ebasic_hstore_seq; + +drop table ebasic_json_list cascade constraints purge; +drop sequence ebasic_json_list_seq; + drop table ebasic_json_map cascade constraints purge; drop sequence ebasic_json_map_seq; @@ -475,6 +807,9 @@ drop sequence ebasic_json_map_blob_seq; drop table ebasic_json_map_clob cascade constraints purge; drop sequence ebasic_json_map_clob_seq; +drop table ebasic_json_map_detail cascade constraints purge; +drop sequence ebasic_json_map_detail_seq; + drop table ebasic_json_map_json_b cascade constraints purge; drop sequence ebasic_json_map_json_b_seq; @@ -493,9 +828,21 @@ drop sequence ebasic_json_node_json_b_seq; drop table ebasic_json_node_varchar cascade constraints purge; drop sequence ebasic_json_node_varchar_seq; +drop table ebasic_json_unmapped cascade constraints purge; +drop sequence ebasic_json_unmapped_seq; + drop table e_basic_ndc cascade constraints purge; drop sequence e_basic_ndc_seq; +drop table ebasic_no_sdchild cascade constraints purge; +drop sequence ebasic_no_sdchild_seq; + +drop table ebasic_sdchild cascade constraints purge; +drop sequence ebasic_sdchild_seq; + +drop table ebasic_soft_delete cascade constraints purge; +drop sequence ebasic_soft_delete_seq; + drop table e_basicver cascade constraints purge; drop sequence e_basicver_seq; @@ -505,6 +852,11 @@ drop sequence e_basic_withlife_seq; drop table e_basicverucon cascade constraints purge; drop sequence e_basicverucon_seq; +drop table e_col_ab cascade constraints purge; +drop sequence e_col_ab_seq; + +drop table ecustom_id cascade constraints purge; + drop table eemb_inner cascade constraints purge; drop sequence eemb_inner_seq; @@ -538,8 +890,40 @@ drop sequence eopt_one_c_seq; drop table eperson cascade constraints purge; drop sequence eperson_seq; +drop table e_person_online cascade constraints purge; +drop sequence e_person_online_seq; + drop table esimple cascade constraints purge; -drop sequence esimple_seq; + +drop table esoft_del_book cascade constraints purge; +drop sequence esoft_del_book_seq; + +drop table esoft_del_book_esoft_del_user cascade constraints purge; + +drop table esoft_del_down cascade constraints purge; +drop sequence esoft_del_down_seq; + +drop table esoft_del_mid cascade constraints purge; +drop sequence esoft_del_mid_seq; + +drop table esoft_del_role cascade constraints purge; +drop sequence esoft_del_role_seq; + +drop table esoft_del_role_esoft_del_user cascade constraints purge; + +drop table esoft_del_top cascade constraints purge; +drop sequence esoft_del_top_seq; + +drop table esoft_del_up cascade constraints purge; +drop sequence esoft_del_up_seq; + +drop table esoft_del_user cascade constraints purge; +drop sequence esoft_del_user_seq; + +drop table esoft_del_user_esoft_del_role cascade constraints purge; + +drop table esome_convert_type cascade constraints purge; +drop sequence esome_convert_type_seq; drop table esome_type cascade constraints purge; drop sequence esome_type_seq; @@ -547,6 +931,9 @@ drop sequence esome_type_seq; drop table etrans_many cascade constraints purge; drop sequence etrans_many_seq; +drop table rawinherit_uncle cascade constraints purge; +drop sequence rawinherit_uncle_seq; + drop table evanilla_collection cascade constraints purge; drop sequence evanilla_collection_seq; @@ -565,6 +952,9 @@ drop sequence td_child_seq; drop table td_parent cascade constraints purge; drop sequence td_parent_seq; +drop table empl cascade constraints purge; +drop sequence empl_seq; + drop table feature_desc cascade constraints purge; drop sequence feature_desc_seq; @@ -575,17 +965,38 @@ drop table foo cascade constraints purge; drop sequence foo_seq; drop table gen_key_identity cascade constraints purge; -drop sequence gen_key_identity_seq; drop table gen_key_sequence cascade constraints purge; -drop sequence seq; +drop sequence SEQ; drop table gen_key_table cascade constraints purge; drop sequence gen_key_table_seq; +drop table grand_parent_person cascade constraints purge; +drop sequence grand_parent_person_seq; + +drop table survey_group cascade constraints purge; +drop sequence survey_group_seq; + drop table c_group cascade constraints purge; drop sequence c_group_seq; +drop table he_doc cascade constraints purge; +drop sequence he_doc_seq; + +drop table hx_link cascade constraints purge; +drop sequence hx_link_seq; + +drop table hx_link_doc cascade constraints purge; + +drop table hi_doc cascade constraints purge; +drop sequence hi_doc_seq; + +drop table hi_link cascade constraints purge; +drop sequence hi_link_seq; + +drop table hi_link_doc cascade constraints purge; + drop table imrelated cascade constraints purge; drop sequence imrelated_seq; @@ -611,6 +1022,25 @@ drop sequence drel_invoice_seq; drop table item cascade constraints purge; +drop table monkey cascade constraints purge; +drop sequence monkey_seq; + +drop table trainer cascade constraints purge; +drop sequence trainer_seq; + +drop table trainer_monkey cascade constraints purge; + +drop table troop cascade constraints purge; +drop sequence troop_seq; + +drop table troop_monkey cascade constraints purge; + +drop table l2_cldf_reset_bean cascade constraints purge; +drop sequence l2_cldf_reset_bean_seq; + +drop table l2_cldf_reset_bean_child cascade constraints purge; +drop sequence l2_cldf_reset_bean_child_seq; + drop table level1 cascade constraints purge; drop sequence level1_seq; @@ -629,6 +1059,12 @@ drop sequence level3_seq; drop table level4 cascade constraints purge; drop sequence level4_seq; +drop table link cascade constraints purge; +drop sequence link_seq; + +drop table link_draft cascade constraints purge; +drop sequence link_draft_seq; + drop table la_attr_value cascade constraints purge; drop sequence la_attr_value_seq; @@ -666,6 +1102,16 @@ drop sequence muser_seq; drop table muser_type cascade constraints purge; drop sequence muser_type_seq; +drop table mail_box cascade constraints purge; +drop sequence mail_box_seq; + +drop table mail_user cascade constraints purge; +drop sequence mail_user_seq; + +drop table mail_user_inbox cascade constraints purge; + +drop table mail_user_outbox cascade constraints purge; + drop table map_super_actual cascade constraints purge; drop sequence map_super_actual_seq; @@ -680,12 +1126,38 @@ drop sequence mnoc_user_seq; drop table mnoc_user_mnoc_role cascade constraints purge; +drop table mny_a cascade constraints purge; +drop sequence mny_a_seq; + +drop table mny_b cascade constraints purge; +drop sequence mny_b_seq; + +drop table mny_b_mny_c cascade constraints purge; + +drop table mny_c cascade constraints purge; +drop sequence mny_c_seq; + +drop table mny_topic cascade constraints purge; +drop sequence mny_topic_seq; + +drop table subtopics cascade constraints purge; + drop table mp_role cascade constraints purge; drop sequence mp_role_seq; drop table mp_user cascade constraints purge; drop sequence mp_user_seq; +drop table ms_many_a cascade constraints purge; +drop sequence ms_many_a_seq; + +drop table ms_many_a_many_b cascade constraints purge; + +drop table ms_many_b cascade constraints purge; +drop sequence ms_many_b_seq; + +drop table ms_many_b_many_a cascade constraints purge; + drop table my_lob_size cascade constraints purge; drop sequence my_lob_size_seq; @@ -702,13 +1174,31 @@ drop table o_cached_bean_country cascade constraints purge; drop table o_cached_bean_child cascade constraints purge; drop sequence o_cached_bean_child_seq; +drop table o_cached_natkey cascade constraints purge; +drop sequence o_cached_natkey_seq; + +drop table o_cached_natkey3 cascade constraints purge; +drop sequence o_cached_natkey3_seq; + drop table ocar cascade constraints purge; drop sequence ocar_seq; +drop table ocompany cascade constraints purge; +drop sequence ocompany_seq; + drop table oengine cascade constraints purge; drop table ogear_box cascade constraints purge; +drop table oroad_show_msg cascade constraints purge; +drop sequence oroad_show_msg_seq; + +drop table om_ordered_detail cascade constraints purge; +drop sequence om_ordered_detail_seq; + +drop table om_ordered_master cascade constraints purge; +drop sequence om_ordered_master_seq; + drop table o_order cascade constraints purge; drop sequence o_order_seq; @@ -722,12 +1212,49 @@ drop table s_order_items cascade constraints purge; drop table or_order_ship cascade constraints purge; drop sequence or_order_ship_seq; +drop table organisation cascade constraints purge; +drop sequence organisation_seq; + +drop table oto_bchild cascade constraints purge; +drop sequence oto_bchild_seq; + +drop table oto_bmaster cascade constraints purge; +drop sequence oto_bmaster_seq; + drop table oto_child cascade constraints purge; drop sequence oto_child_seq; +drop table oto_cust cascade constraints purge; +drop sequence oto_cust_seq; + +drop table oto_cust_address cascade constraints purge; +drop sequence oto_cust_address_seq; + drop table oto_master cascade constraints purge; drop sequence oto_master_seq; +drop table oto_prime cascade constraints purge; +drop sequence oto_prime_seq; + +drop table oto_prime_extra cascade constraints purge; + +drop table oto_th_many cascade constraints purge; +drop sequence oto_th_many_seq; + +drop table oto_th_one cascade constraints purge; +drop sequence oto_th_one_seq; + +drop table oto_th_top cascade constraints purge; +drop sequence oto_th_top_seq; + +drop table oto_ubprime cascade constraints purge; + +drop table oto_ubprime_extra cascade constraints purge; + +drop table oto_uprime cascade constraints purge; + +drop table oto_uprime_extra cascade constraints purge; + drop table pfile cascade constraints purge; drop sequence pfile_seq; @@ -750,6 +1277,9 @@ drop sequence rawinherit_parent_seq; drop table rawinherit_parent_rawinherit_d cascade constraints purge; +drop table parent_person cascade constraints purge; +drop sequence parent_person_seq; + drop table c_participation cascade constraints purge; drop sequence c_participation_seq; @@ -762,13 +1292,15 @@ drop table persistent_file_content cascade constraints purge; drop sequence persistent_file_content_seq; drop table persons cascade constraints purge; -drop sequence persons_seq; +drop sequence PERSONS_seq; drop table person cascade constraints purge; drop sequence person_seq; drop table phones cascade constraints purge; -drop sequence phones_seq; +drop sequence PHONES_seq; + +drop table primary_revision cascade constraints purge; drop table o_product cascade constraints purge; drop sequence o_product_seq; @@ -777,6 +1309,9 @@ drop table pp cascade constraints purge; drop table pp_to_ww cascade constraints purge; +drop table question cascade constraints purge; +drop sequence question_seq; + drop table rcustomer cascade constraints purge; drop table r_orders cascade constraints purge; @@ -785,13 +1320,13 @@ drop table region cascade constraints purge; drop table resourcefile cascade constraints purge; +drop table em_role cascade constraints purge; +drop sequence em_role_seq; + drop table mt_role cascade constraints purge; drop table mt_role_permission cascade constraints purge; -drop table em_role cascade constraints purge; -drop sequence em_role_seq; - drop table f_second cascade constraints purge; drop sequence f_second_seq; @@ -828,11 +1363,23 @@ drop sequence sub_section_seq; drop table sub_type cascade constraints purge; drop sequence sub_type_seq; +drop table survey cascade constraints purge; +drop sequence survey_seq; + drop table tbytes_only cascade constraints purge; drop sequence tbytes_only_seq; drop table tcar cascade constraints purge; +drop table tevent cascade constraints purge; +drop sequence tevent_seq; + +drop table tevent_many cascade constraints purge; +drop sequence tevent_many_seq; + +drop table tevent_one cascade constraints purge; +drop sequence tevent_one_seq; + drop table tint_root cascade constraints purge; drop sequence tint_root_seq; @@ -867,12 +1414,14 @@ drop sequence twith_pre_insert_seq; drop table mt_tenant cascade constraints purge; -drop table sa_tire cascade constraints purge; -drop sequence sa_tire_seq; +drop table test_annotation_base_entity cascade constraints purge; drop table tire cascade constraints purge; drop sequence tire_seq; +drop table sa_tire cascade constraints purge; +drop sequence sa_tire_seq; + drop table trip cascade constraints purge; drop sequence trip_seq; @@ -881,6 +1430,9 @@ drop sequence truck_ref_seq; drop table type cascade constraints purge; +drop table tz_bean cascade constraints purge; +drop sequence tz_bean_seq; + drop table ut_detail cascade constraints purge; drop sequence ut_detail_seq; @@ -891,14 +1443,17 @@ drop table uuone cascade constraints purge; drop table uutwo cascade constraints purge; -drop table em_user cascade constraints purge; -drop sequence em_user_seq; +drop table c_user cascade constraints purge; +drop sequence c_user_seq; drop table tx_user cascade constraints purge; drop sequence tx_user_seq; -drop table c_user cascade constraints purge; -drop sequence c_user_seq; +drop table g_user cascade constraints purge; +drop sequence g_user_seq; + +drop table em_user cascade constraints purge; +drop sequence em_user_seq; drop table oto_user cascade constraints purge; drop sequence oto_user_seq; @@ -919,11 +1474,14 @@ drop table warehousesshippingzones cascade constraints purge; drop table sa_wheel cascade constraints purge; drop sequence sa_wheel_seq; +drop table wheel cascade constraints purge; +drop sequence wheel_seq; + drop table sp_car_wheel cascade constraints purge; drop sequence sp_car_wheel_seq; -drop table wheel cascade constraints purge; -drop sequence wheel_seq; +drop table g_who_props_otm cascade constraints purge; +drop sequence g_who_props_otm_seq; drop table with_zero cascade constraints purge; drop sequence with_zero_seq; @@ -936,3 +1494,5 @@ drop table wview cascade constraints purge; drop table zones cascade constraints purge; drop sequence zones_seq; +drop index ix_cntct_lst_nm_frst_nm; +drop index ix_e_basic_name; diff --git a/src/test/ddl-review/pg-create-all.sql b/src/test/ddl-review/pg-create-all.sql index 4956fd1bb..d9f99e631 100644 --- a/src/test/ddl-review/pg-create-all.sql +++ b/src/test/ddl-review/pg-create-all.sql @@ -1,3 +1,4 @@ +-- Generated by ebean unknown at 2018-03-08T06:39:45.063Z create table asimple_bean ( id bigserial not null, name varchar(255), @@ -16,20 +17,20 @@ create table oto_account ( id bigserial not null, name varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created timestamptz not null, + when_modified timestamptz not null, constraint pk_oto_account primary key (id) ); -create table o_address ( - id smallserial not null, - line_1 varchar(100), - line_2 varchar(100), - city varchar(100), - cretime timestamp, - country_code varchar(2), - updtime timestamp not null, - constraint pk_o_address primary key (id) +create table addr ( + id bigserial not null, + employee_id bigint, + name varchar(255), + address_line1 varchar(255), + address_line2 varchar(255), + city varchar(255), + version bigint not null, + constraint pk_addr primary key (id) ); create table address ( @@ -39,15 +40,38 @@ create table address ( constraint pk_address primary key (oid) ); -create table animals ( - species varchar(31) not null, +create table o_address ( + id smallserial not null, + line_1 varchar(100), + line_2 varchar(100), + city varchar(100), + cretime timestamptz, + country_code varchar(2), + updtime timestamptz not null, + constraint pk_o_address primary key (id) +); + +create table album ( + id bigserial not null, + name varchar(255), + cover_id bigint, + deleted boolean default false not null, + created_at timestamptz not null, + last_update timestamptz not null, + constraint uq_album_cover_id unique (cover_id), + constraint pk_album primary key (id) +); + +create table animal ( + species varchar(255) not null, id bigserial not null, shelter_id bigint, version bigint not null, name varchar(255), registration_number varchar(255), date_of_birth date, - constraint pk_animals primary key (id) + dog_size varchar(255), + constraint pk_animal primary key (id) ); create table animal_shelter ( @@ -61,8 +85,8 @@ create table article ( id serial not null, name varchar(255), author varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_article primary key (id) ); @@ -71,16 +95,16 @@ create table attribute ( option_type integer not null, id serial not null, attribute_holder_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_attribute primary key (id) ); create table attribute_holder ( id serial not null, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_attribute_holder primary key (id) ); @@ -114,10 +138,46 @@ create table bsimple_with_gen ( constraint pk_bsimple_with_gen primary key (id) ); +create table bsite ( + id uuid not null, + name varchar(255), + constraint pk_bsite primary key (id) +); + +create table bsite_user ( + site_id uuid not null, + user_id uuid not null, + access_level integer, + constraint ck_bsite_user_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user primary key (site_id,user_id) +); + +create table bsite_user_b ( + site uuid not null, + usr uuid not null, + access_level integer, + constraint ck_bsite_user_b_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_b primary key (site,usr) +); + +create table bsite_user_c ( + site_uid uuid not null, + user_uid uuid not null, + access_level integer, + constraint ck_bsite_user_c_access_level check ( access_level in (0,1,2)), + constraint pk_bsite_user_c primary key (site_uid,user_uid) +); + +create table buser ( + id uuid not null, + name varchar(255), + constraint pk_buser primary key (id) +); + create table bwith_qident ( id serial not null, - "Name" varchar(255), - last_updated timestamp not null, + "Name" varchar(191), + last_updated timestamptz not null, constraint uq_bwith_qident_name unique ("Name"), constraint pk_bwith_qident primary key (id) ); @@ -125,9 +185,10 @@ create table bwith_qident ( create table basic_joda_entity ( id bigserial not null, name varchar(255), - created timestamp not null, - updated timestamp not null, - version timestamp not null, + period varchar(50), + created timestamptz not null, + updated timestamptz not null, + version timestamptz not null, constraint pk_basic_joda_entity primary key (id) ); @@ -140,15 +201,30 @@ create table bean_with_time_zone ( create table drel_booking ( id bigint not null, + booking_uid bigint, agent_invoice bigint, client_invoice bigint, version integer not null, + constraint uq_drel_booking_booking_uid unique (booking_uid), constraint uq_drel_booking_agent_invoice unique (agent_invoice), constraint uq_drel_booking_client_invoice unique (client_invoice), constraint pk_drel_booking primary key (id) ); create sequence drel_booking_seq; +create table cinh_root ( + dtype varchar(3) not null, + id serial not null, + license_number varchar(255), + cretime timestamptz not null, + updtime timestamptz not null, + version bigint not null, + driver varchar(255), + notes varchar(255), + action varchar(255), + constraint pk_cinh_root primary key (id) +); + create table ckey_assoc ( id serial not null, assoc_one varchar(255), @@ -174,7 +250,7 @@ create table ckey_parent ( create table calculation_result ( id serial not null, - charge float, + charge float not null, product_configuration_id integer, group_configuration_id integer, constraint pk_calculation_result primary key (id) @@ -211,15 +287,41 @@ create table sp_car_car_wheels ( create table car_accessory ( id serial not null, name varchar(255), + fuse_id bigint not null, car_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_car_accessory primary key (id) ); +create table car_fuse ( + id bigserial not null, + location_code varchar(255), + constraint pk_car_fuse primary key (id) +); + +create table category ( + id bigserial not null, + name varchar(255), + surveyobjectid bigint, + sequence_number integer not null, + constraint pk_category primary key (id) +); + +create table child_person ( + identifier serial not null, + name varchar(255), + age integer, + some_bean_id integer, + parent_identifier integer, + family_name varchar(255), + address varchar(255), + constraint pk_child_person primary key (identifier) +); + create table configuration ( - type varchar(31) not null, + type varchar(21) not null, id serial not null, name varchar(255), configurations_id integer, @@ -236,23 +338,23 @@ create table configurations ( create table contact ( id serial not null, - first_name varchar(255), - last_name varchar(255), + first_name varchar(127), + last_name varchar(127), phone varchar(255), mobile varchar(255), email varchar(255), customer_id integer not null, group_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, constraint pk_contact primary key (id) ); create table contact_group ( id serial not null, name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_contact_group primary key (id) ); @@ -262,8 +364,8 @@ create table contact_note ( contact_id integer, title varchar(255), note text, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_contact_note primary key (id) ); @@ -271,11 +373,11 @@ create table contact_note ( create table c_conversation ( id bigserial not null, title varchar(255), - isopen boolean, + isopen boolean default false not null, group_id bigint, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created timestamptz not null, + when_modified timestamptz not null, constraint pk_c_conversation primary key (id) ); @@ -285,6 +387,13 @@ create table o_country ( constraint pk_o_country primary key (code) ); +create table cover ( + id bigserial not null, + s3url varchar(255), + deleted boolean default false not null, + constraint pk_cover primary key (id) +); + create table o_customer ( id serial not null, status varchar(1), @@ -293,19 +402,34 @@ create table o_customer ( anniversary date, billing_address_id smallint, shipping_address_id smallint, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, - constraint ck_o_customer_status check (status in ('N','A','I')), + constraint ck_o_customer_status check ( status in ('N','A','I')), constraint pk_o_customer primary key (id) ); +comment on table o_customer is 'Holds external customers'; +comment on column o_customer.status is 'status of the customer'; +comment on column o_customer.smallnote is 'Short notes regarding the customer'; +comment on column o_customer.anniversary is 'Join date of the customer'; + +create table dcredit ( + id bigserial not null, + credit varchar(255), + constraint pk_dcredit primary key (id) +); + +create table dcredit_drol ( + dcredit_id bigint not null, + drol_id bigint not null, + constraint pk_dcredit_drol primary key (dcredit_id,drol_id) +); create table dexh_entity ( oid bigserial not null, - exhange_rate decimal(38), - exhange_cmoney_amount decimal(38), - exhange_cmoney_currency varchar(3), - last_updated timestamp not null, + exhange varchar(255), + an_enum_type varchar(255), + last_updated timestamptz not null, constraint pk_dexh_entity primary key (oid) ); @@ -314,35 +438,203 @@ create table dperson ( first_name varchar(255), last_name varchar(255), salary decimal(38), - a_amt decimal(38), - a_curr varchar(3), - i_start timestamp, - i_end timestamp, constraint pk_dperson primary key (id) ); +create table drol ( + id bigserial not null, + name varchar(255), + constraint pk_drol primary key (id) +); + +create table drot ( + id bigserial not null, + name varchar(255), + constraint pk_drot primary key (id) +); + +create table drot_drol ( + drot_id bigint not null, + drol_id bigint not null, + constraint pk_drot_drol primary key (drot_id,drol_id) +); + create table rawinherit_data ( id bigserial not null, val integer, constraint pk_rawinherit_data primary key (id) ); +create table dfk_cascade ( + id bigserial not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_cascade primary key (id) +); + +create table dfk_cascade_one ( + id bigserial not null, + name varchar(255), + constraint pk_dfk_cascade_one primary key (id) +); + +create table dfk_none ( + id bigserial not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_none primary key (id) +); + +create table dfk_none_via_join ( + id bigserial not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_none_via_join primary key (id) +); + +create table dfk_one ( + id bigserial not null, + name varchar(255), + constraint pk_dfk_one primary key (id) +); + +create table dfk_set_null ( + id bigserial not null, + name varchar(255), + one_id bigint, + constraint pk_dfk_set_null primary key (id) +); + +create table doc ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_doc primary key (id) +); + +create table doc_link ( + doc_id bigint not null, + link_id bigint not null, + constraint pk_doc_link primary key (doc_id,link_id) +); + +create table doc_link_draft ( + doc_id bigint not null, + link_id bigint not null, + constraint pk_doc_link_draft primary key (doc_id,link_id) +); + +create table doc_draft ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_doc_draft primary key (id) +); + +create table document ( + id bigserial not null, + title varchar(127), + body varchar(255), + organisation_id bigint, + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint uq_document_title unique (title), + constraint pk_document primary key (id) +); + +create table document_draft ( + id bigserial not null, + title varchar(127), + body varchar(255), + when_publish timestamptz, + organisation_id bigint, + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint uq_document_draft_title unique (title), + constraint pk_document_draft primary key (id) +); + +create table document_media ( + id bigserial not null, + document_id bigint, + name varchar(255), + description varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_document_media primary key (id) +); + +create table document_media_draft ( + id bigserial not null, + document_id bigint, + name varchar(255), + description varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_document_media_draft primary key (id) +); + +create table earray_bean ( + id bigserial not null, + name varchar(255), + phone_numbers varchar[], + uids uuid[], + other_ids bigint[], + doubs float[], + statuses varchar[], + status2 varchar[], + version bigint not null, + constraint pk_earray_bean primary key (id) +); + +create table earray_set_bean ( + id bigserial not null, + name varchar(255), + phone_numbers varchar[], + uids uuid[], + other_ids bigint[], + doubs float[], + version bigint not null, + constraint pk_earray_set_bean primary key (id) +); + create table e_basic ( id serial not null, status varchar(1), - name varchar(255), + name varchar(127), description varchar(255), - some_date timestamp, - constraint ck_e_basic_status check (status in ('N','A','I')), + some_date timestamptz, + constraint ck_e_basic_status check ( status in ('N','A','I')), constraint pk_e_basic primary key (id) ); +create table ebasic_change_log ( + id bigserial not null, + name varchar(20), + short_description varchar(50), + long_description varchar(100), + who_created varchar(255) not null, + who_modified varchar(255) not null, + when_created timestamptz not null, + when_modified timestamptz not null, + version bigint not null, + constraint pk_ebasic_change_log primary key (id) +); + create table ebasic_clob ( id bigserial not null, name varchar(255), title varchar(255), description text, - last_update timestamp not null, + last_update timestamptz not null, constraint pk_ebasic_clob primary key (id) ); @@ -351,7 +643,7 @@ create table ebasic_clob_fetch_eager ( name varchar(255), title varchar(255), description text, - last_update timestamp not null, + last_update timestamptz not null, constraint pk_ebasic_clob_fetch_eager primary key (id) ); @@ -367,7 +659,8 @@ create table e_basicenc ( name varchar(255), description bytea, dob bytea, - last_update timestamp, + status bytea, + last_update timestamptz, constraint pk_e_basicenc primary key (id) ); @@ -377,7 +670,7 @@ create table e_basicenc_bin ( description varchar(255), data bytea, some_time bytea, - last_update timestamp not null, + last_update timestamptz not null, constraint pk_e_basicenc_bin primary key (id) ); @@ -385,10 +678,41 @@ create table e_basic_enum_id ( status varchar(1) not null, name varchar(255), description varchar(255), - constraint ck_e_basic_enum_id_status check (status in ('N','A','I')), + constraint ck_e_basic_enum_id_status check ( status in ('N','A','I')), constraint pk_e_basic_enum_id primary key (status) ); +create table e_basic_eni ( + id serial not null, + status integer, + name varchar(255), + description varchar(255), + some_date timestamptz, + constraint ck_e_basic_eni_status check ( status in (1,2,3)), + constraint pk_e_basic_eni primary key (id) +); + +create table ebasic_hstore ( + id bigserial not null, + name varchar(255), + map hstore, + version bigint not null, + constraint pk_ebasic_hstore primary key (id) +); + +create table ebasic_json_list ( + id bigserial not null, + name varchar(255), + bean_set json, + bean_list jsonb, + bean_map json, + plain_bean json, + flags json, + tags varchar(100), + version bigint not null, + constraint pk_ebasic_json_list primary key (id) +); + create table ebasic_json_map ( id bigserial not null, name varchar(255), @@ -413,6 +737,15 @@ create table ebasic_json_map_clob ( constraint pk_ebasic_json_map_clob primary key (id) ); +create table ebasic_json_map_detail ( + id bigserial not null, + owner_id bigint, + name varchar(255), + content json, + version bigint not null, + constraint pk_ebasic_json_map_detail primary key (id) +); + create table ebasic_json_map_json_b ( id bigserial not null, name varchar(255), @@ -461,39 +794,89 @@ create table ebasic_json_node_varchar ( constraint pk_ebasic_json_node_varchar primary key (id) ); +create table ebasic_json_unmapped ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_ebasic_json_unmapped primary key (id) +); + create table e_basic_ndc ( id serial not null, name varchar(255), constraint pk_e_basic_ndc primary key (id) ); +create table ebasic_no_sdchild ( + id bigserial not null, + owner_id bigint not null, + child_name varchar(255), + amount bigint not null, + version bigint not null, + constraint pk_ebasic_no_sdchild primary key (id) +); + +create table ebasic_sdchild ( + id bigserial not null, + owner_id bigint not null, + child_name varchar(255), + amount bigint not null, + version bigint not null, + deleted boolean default false not null, + constraint pk_ebasic_sdchild primary key (id) +); + +create table ebasic_soft_delete ( + id bigserial not null, + name varchar(255), + description varchar(255), + version bigint not null, + deleted boolean default false not null, + constraint pk_ebasic_soft_delete primary key (id) +); + create table e_basicver ( id serial not null, name varchar(255), description varchar(255), other varchar(255), - last_update timestamp not null, + last_update timestamptz not null, constraint pk_e_basicver primary key (id) ); create table e_basic_withlife ( id bigserial not null, name varchar(255), + deleted boolean default false not null, version bigint not null, constraint pk_e_basic_withlife primary key (id) ); create table e_basicverucon ( id serial not null, - name varchar(255), - other varchar(255), - other_one varchar(255), + name varchar(127), + other varchar(127), + other_one varchar(127), description varchar(255), - last_update timestamp not null, + last_update timestamptz not null, constraint uq_e_basicverucon_name unique (name), + constraint uq_e_basicverucon_other_other_one unique (other,other_one), constraint pk_e_basicverucon primary key (id) ); +create table e_col_ab ( + id bigserial not null, + column_a varchar(255), + column_b varchar(255), + constraint pk_e_col_ab primary key (id) +); + +create table ecustom_id ( + id varchar(127) not null, + name varchar(255), + constraint pk_ecustom_id primary key (id) +); + create table eemb_inner ( id serial not null, nome_inner varchar(255), @@ -505,8 +888,8 @@ create table eemb_inner ( create table eemb_outer ( id serial not null, nome_outer varchar(255), - date1 timestamp, - date2 timestamp, + date1 timestamptz, + date2 timestamptz, update_count integer not null, constraint pk_eemb_outer primary key (id) ); @@ -515,16 +898,18 @@ create table egen_props ( id bigserial not null, name varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, - ts_created timestamp not null, - ts_updated timestamp not null, - ldt_created timestamp not null, - ldt_updated timestamp not null, - odt_created timestamp not null, - odt_updated timestamp not null, - zdt_created timestamp not null, - zdt_updated timestamp not null, + when_created timestamptz not null, + when_modified timestamptz not null, + ts_created timestamptz not null, + ts_updated timestamptz not null, + ldt_created timestamptz not null, + ldt_updated timestamptz not null, + odt_created timestamptz not null, + odt_updated timestamptz not null, + zdt_created timestamptz not null, + zdt_updated timestamptz not null, + instant_created timestamptz not null, + instant_updated timestamptz not null, long_created bigint not null, long_updated bigint not null, constraint pk_egen_props primary key (id) @@ -532,17 +917,21 @@ create table egen_props ( create table einvoice ( id bigserial not null, - invoice_date timestamp, + invoice_date timestamptz, state integer, person_id bigint, ship_street varchar(255), ship_suburb varchar(255), ship_city varchar(255), - street varchar(255), - suburb varchar(255), - city varchar(255), + ship_status varchar(3), + bill_street varchar(255), + bill_suburb varchar(255), + bill_city varchar(255), + bill_status varchar(3), version bigint not null, - constraint ck_einvoice_state check (state in (0,1,2)), + constraint ck_einvoice_state check ( state in (0,1,2)), + constraint ck_einvoice_ship_status check ( ship_status in ('ONE','TWO')), + constraint ck_einvoice_bill_status check ( bill_status in ('ONE','TWO')), constraint pk_einvoice primary key (id) ); @@ -571,8 +960,8 @@ create table eopt_one_a ( id serial not null, name_for_a varchar(255), b_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_eopt_one_a primary key (id) ); @@ -581,8 +970,8 @@ create table eopt_one_b ( id serial not null, name_for_b varchar(255), c_id integer not null, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_eopt_one_b primary key (id) ); @@ -590,8 +979,8 @@ create table eopt_one_b ( create table eopt_one_c ( id serial not null, name_for_c varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_eopt_one_c primary key (id) ); @@ -602,17 +991,130 @@ create table eperson ( notes varchar(255), street varchar(255), suburb varchar(255), - city varchar(255), + addr_city varchar(255), + addr_status varchar(3), version bigint not null, + constraint ck_eperson_addr_status check ( addr_status in ('ONE','TWO')), constraint pk_eperson primary key (id) ); +create table e_person_online ( + id bigserial not null, + email varchar(127), + online_status boolean default false not null, + when_updated timestamptz not null, + constraint uq_e_person_online_email unique (email), + constraint pk_e_person_online primary key (id) +); + create table esimple ( usertypeid serial not null, name varchar(255), constraint pk_esimple primary key (usertypeid) ); +create table esoft_del_book ( + id bigserial not null, + book_title varchar(255), + lend_by_id bigint, + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_book primary key (id) +); + +create table esoft_del_book_esoft_del_user ( + esoft_del_book_id bigint not null, + esoft_del_user_id bigint not null, + constraint pk_esoft_del_book_esoft_del_user primary key (esoft_del_book_id,esoft_del_user_id) +); + +create table esoft_del_down ( + id bigserial not null, + esoft_del_mid_id bigint not null, + down varchar(255), + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_down primary key (id) +); + +create table esoft_del_mid ( + id bigserial not null, + top_id bigint, + mid varchar(255), + up_id bigint, + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_mid primary key (id) +); + +create table esoft_del_one_a ( + id bigserial not null, + name varchar(255), + oneb_id bigint, + deleted boolean default false not null, + version bigint not null, + constraint uq_esoft_del_one_a_oneb_id unique (oneb_id), + constraint pk_esoft_del_one_a primary key (id) +); + +create table esoft_del_one_b ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_esoft_del_one_b primary key (id) +); + +create table esoft_del_role ( + id bigserial not null, + role_name varchar(255), + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_role primary key (id) +); + +create table esoft_del_role_esoft_del_user ( + esoft_del_role_id bigint not null, + esoft_del_user_id bigint not null, + constraint pk_esoft_del_role_esoft_del_user primary key (esoft_del_role_id,esoft_del_user_id) +); + +create table esoft_del_top ( + id bigserial not null, + name varchar(255), + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_top primary key (id) +); + +create table esoft_del_up ( + id bigserial not null, + up varchar(255), + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_up primary key (id) +); + +create table esoft_del_user ( + id bigserial not null, + user_name varchar(255), + version bigint not null, + deleted boolean default false not null, + constraint pk_esoft_del_user primary key (id) +); + +create table esoft_del_user_esoft_del_role ( + esoft_del_user_id bigint not null, + esoft_del_role_id bigint not null, + constraint pk_esoft_del_user_esoft_del_role primary key (esoft_del_user_id,esoft_del_role_id) +); + +create table esome_convert_type ( + id bigserial not null, + name varchar(255), + money decimal(38), + constraint pk_esome_convert_type primary key (id) +); + create table esome_type ( id serial not null, currency varchar(3), @@ -627,6 +1129,14 @@ create table etrans_many ( constraint pk_etrans_many primary key (id) ); +create table rawinherit_uncle ( + id serial not null, + name varchar(255), + parent_id bigint not null, + version bigint not null, + constraint pk_rawinherit_uncle primary key (id) +); + create table evanilla_collection ( id serial not null, name varchar(255), @@ -643,11 +1153,11 @@ create table evanilla_collection_detail ( create table ewho_props ( id bigserial not null, name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, who_created varchar(255) not null, who_modified varchar(255) not null, - version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, constraint pk_ewho_props primary key (id) ); @@ -674,6 +1184,14 @@ create table td_parent ( constraint pk_td_parent primary key (parent_id) ); +create table empl ( + id bigserial not null, + name varchar(255), + age integer, + default_address_id bigint, + constraint pk_empl primary key (id) +); + create table feature_desc ( id serial not null, name varchar(255), @@ -705,7 +1223,7 @@ create table gen_key_sequence ( description varchar(255), constraint pk_gen_key_sequence primary key (id) ); -create sequence seq; +create sequence SEQ; create table gen_key_table ( id bigserial not null, @@ -713,16 +1231,86 @@ create table gen_key_table ( constraint pk_gen_key_table primary key (id) ); +create table grand_parent_person ( + identifier serial not null, + name varchar(255), + age integer, + some_bean_id integer, + family_name varchar(255), + address varchar(255), + constraint pk_grand_parent_person primary key (identifier) +); + +create table survey_group ( + id bigserial not null, + name varchar(255), + categoryobjectid bigint, + sequence_number integer not null, + constraint pk_survey_group primary key (id) +); + create table c_group ( id bigserial not null, - inactive boolean, + inactive boolean default false not null, name varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created timestamptz not null, + when_modified timestamptz not null, constraint pk_c_group primary key (id) ); +create table he_doc ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_he_doc primary key (id) +); + +create table hx_link ( + id bigserial not null, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_hx_link primary key (id) +); + +create table hx_link_doc ( + hx_link_id bigint not null, + he_doc_id bigint not null, + constraint pk_hx_link_doc primary key (hx_link_id,he_doc_id) +); + +create table hi_doc ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_hi_doc primary key (id) +); + +create table hi_link ( + id bigserial not null, + name varchar(255), + location varchar(255), + comments varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_hi_link primary key (id) +); + +create table hi_link_doc ( + hi_link_id bigint not null, + hi_doc_id bigint not null, + constraint pk_hi_link_doc primary key (hi_link_id,hi_doc_id) +); + create table imrelated ( id bigserial not null, name varchar(255), @@ -731,17 +1319,17 @@ create table imrelated ( ); create table imroot ( - dtype varchar(10) not null, + dtype varchar(31) not null, id bigserial not null, - title varchar(255), - when_title timestamp, name varchar(255), + title varchar(255), + when_title timestamptz, constraint pk_imroot primary key (id) ); create table ixresource ( dtype varchar(255), - id bytea not null, + id uuid not null, name varchar(255), constraint pk_ixresource primary key (id) ); @@ -788,19 +1376,67 @@ create sequence drel_invoice_seq; create table item ( customer integer not null, - itemnumber varchar(255) not null, + itemnumber varchar(127) not null, description varchar(255), units varchar(255), - type integer, - region integer, - date_modified timestamp, - date_created timestamp, + type integer not null, + region integer not null, + date_modified timestamptz, + date_created timestamptz, modified_by varchar(255), created_by varchar(255), version bigint not null, constraint pk_item primary key (customer,itemnumber) ); +create table monkey ( + mid bigserial not null, + name varchar(255), + food_preference varchar(255), + version bigint not null, + constraint pk_monkey primary key (mid) +); + +create table trainer ( + tid bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_trainer primary key (tid) +); + +create table trainer_monkey ( + trainer_tid bigint not null, + monkey_mid bigint not null, + constraint uq_trainer_monkey_mid unique (monkey_mid), + constraint pk_trainer_monkey primary key (trainer_tid,monkey_mid) +); + +create table troop ( + pid bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_troop primary key (pid) +); + +create table troop_monkey ( + troop_pid bigint not null, + monkey_mid bigint not null, + constraint uq_troop_monkey_mid unique (monkey_mid), + constraint pk_troop_monkey primary key (troop_pid,monkey_mid) +); + +create table l2_cldf_reset_bean ( + id bigserial not null, + name varchar(255), + constraint pk_l2_cldf_reset_bean primary key (id) +); + +create table l2_cldf_reset_bean_child ( + id bigserial not null, + parent_id bigint, + constraint pk_l2_cldf_reset_bean_child primary key (id) +); + create table level1 ( id bigserial not null, name varchar(255), @@ -843,11 +1479,38 @@ create table level4 ( constraint pk_level4 primary key (id) ); +create table link ( + id bigserial not null, + name varchar(255), + location varchar(255), + when_publish timestamptz, + link_comment varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + deleted boolean default false not null, + constraint pk_link primary key (id) +); + +create table link_draft ( + id bigserial not null, + name varchar(255), + location varchar(255), + when_publish timestamptz, + link_comment varchar(255), + dirty boolean default false not null, + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + deleted boolean default false not null, + constraint pk_link_draft primary key (id) +); + create table la_attr_value ( id serial not null, name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_la_attr_value primary key (id) ); @@ -871,7 +1534,7 @@ create table non_updateprop ( non_enum varchar(5), name varchar(255), note varchar(255), - constraint ck_non_updateprop_non_enum check (non_enum in ('BEGIN','END')), + constraint ck_non_updateprop_non_enum check ( non_enum in ('BEGIN','END')), constraint pk_non_updateprop primary key (id) ); @@ -886,7 +1549,7 @@ create table mprinter ( last_swap_black_id bigint, version bigint not null, constraint uq_mprinter_last_swap_cyan_id unique (last_swap_cyan_id), - constraint uq_mprinter_last_swap_magenta_2 unique (last_swap_magenta_id), + constraint uq_mprinter_last_swap_magenta_id unique (last_swap_magenta_id), constraint uq_mprinter_last_swap_yellow_id unique (last_swap_yellow_id), constraint uq_mprinter_last_swap_black_id unique (last_swap_black_id), constraint pk_mprinter primary key (id) @@ -894,7 +1557,7 @@ create table mprinter ( create table mprinter_state ( id bigserial not null, - flags bigint, + flags bigint not null, printer_id bigint, version bigint not null, constraint pk_mprinter_state primary key (id) @@ -944,11 +1607,37 @@ create table muser_type ( constraint pk_muser_type primary key (id) ); +create table mail_box ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_mail_box primary key (id) +); + +create table mail_user ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_mail_user primary key (id) +); + +create table mail_user_inbox ( + mail_user_id bigint not null, + mail_box_id bigint not null, + constraint pk_mail_user_inbox primary key (mail_user_id,mail_box_id) +); + +create table mail_user_outbox ( + mail_user_id bigint not null, + mail_box_id bigint not null, + constraint pk_mail_user_outbox primary key (mail_user_id,mail_box_id) +); + create table map_super_actual ( id bigserial not null, name varchar(255), - when_created timestamp not null, - when_updated timestamp not null, + when_created timestamptz not null, + when_updated timestamptz not null, constraint pk_map_super_actual primary key (id) ); @@ -959,8 +1648,8 @@ create table c_message ( conversation_id bigint, user_id bigint, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created timestamptz not null, + when_modified timestamptz not null, constraint pk_c_message primary key (id) ); @@ -984,6 +1673,53 @@ create table mnoc_user_mnoc_role ( constraint pk_mnoc_user_mnoc_role primary key (mnoc_user_user_id,mnoc_role_role_id) ); +create table mny_a ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_mny_a primary key (id) +); + +create table mny_b ( + id bigserial not null, + name varchar(255), + a_id bigint, + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_mny_b primary key (id) +); + +create table mny_b_mny_c ( + mny_b_id bigint not null, + mny_c_id bigint not null, + constraint pk_mny_b_mny_c primary key (mny_b_id,mny_c_id) +); + +create table mny_c ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_mny_c primary key (id) +); + +create table mny_topic ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_mny_topic primary key (id) +); + +create table subtopics ( + topic bigint not null, + subtopic bigint not null, + constraint pk_subtopics primary key (topic,subtopic) +); + create table mp_role ( id bigserial not null, mp_user_id bigint not null, @@ -998,10 +1734,38 @@ create table mp_user ( constraint pk_mp_user primary key (id) ); +create table ms_many_a ( + aid bigserial not null, + name varchar(255), + ms_many_a_many_b boolean default false not null, + ms_many_b boolean default false not null, + deleted boolean default false not null, + constraint pk_ms_many_a primary key (aid) +); + +create table ms_many_a_many_b ( + ms_many_a_aid bigint not null, + ms_many_b_bid bigint not null, + constraint pk_ms_many_a_many_b primary key (ms_many_a_aid,ms_many_b_bid) +); + +create table ms_many_b ( + bid bigserial not null, + name varchar(255), + deleted boolean default false not null, + constraint pk_ms_many_b primary key (bid) +); + +create table ms_many_b_many_a ( + ms_many_b_bid bigint not null, + ms_many_a_aid bigint not null, + constraint pk_ms_many_b_many_a primary key (ms_many_b_bid,ms_many_a_aid) +); + create table my_lob_size ( id serial not null, name varchar(255), - my_count integer, + my_count integer not null, my_lob text, constraint pk_my_lob_size primary key (id) ); @@ -1017,7 +1781,7 @@ create table my_lob_size_join_many ( create table noidbean ( name varchar(255), subject varchar(255), - when_created timestamp not null + when_created timestamptz not null ); create table o_cached_bean ( @@ -1038,18 +1802,45 @@ create table o_cached_bean_child ( constraint pk_o_cached_bean_child primary key (id) ); +create table o_cached_natkey ( + id bigserial not null, + store varchar(255), + sku varchar(255), + description varchar(255), + constraint pk_o_cached_natkey primary key (id) +); + +create table o_cached_natkey3 ( + id bigserial not null, + store varchar(255), + code integer not null, + sku varchar(255), + description varchar(255), + constraint pk_o_cached_natkey3 primary key (id) +); + create table ocar ( id serial not null, vin varchar(255), name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_ocar primary key (id) ); +create table ocompany ( + id serial not null, + corp_id varchar(50), + cretime timestamptz not null, + updtime timestamptz not null, + version bigint not null, + constraint uq_ocompany_corp_id unique (corp_id), + constraint pk_ocompany primary key (id) +); + create table oengine ( - engine_id bytea not null, + engine_id uuid not null, short_desc varchar(255), car_id integer, version integer not null, @@ -1058,7 +1849,7 @@ create table oengine ( ); create table ogear_box ( - id bytea not null, + id uuid not null, box_desc varchar(255), box_size integer, car_id integer, @@ -1067,40 +1858,66 @@ create table ogear_box ( constraint pk_ogear_box primary key (id) ); +create table oroad_show_msg ( + id serial not null, + company_id integer not null, + cretime timestamptz not null, + updtime timestamptz not null, + version bigint not null, + constraint uq_oroad_show_msg_company_id unique (company_id), + constraint pk_oroad_show_msg primary key (id) +); + +create table om_ordered_detail ( + id bigserial not null, + name varchar(255), + master_id bigint, + version bigint not null, + sort_order integer, + constraint pk_om_ordered_detail primary key (id) +); + +create table om_ordered_master ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_om_ordered_master primary key (id) +); + create table o_order ( id serial not null, status integer, order_date date, ship_date date, kcustomer_id integer not null, - cretime timestamp not null, - updtime timestamp not null, - constraint ck_o_order_status check (status in (0,1,2,3)), + cretime timestamptz not null, + updtime timestamptz not null, + constraint ck_o_order_status check ( status in (0,1,2,3)), constraint pk_o_order primary key (id) ); create table o_order_detail ( id serial not null, - order_id integer, + order_id integer not null, order_qty integer, ship_qty integer, unit_price float, product_id integer, - cretime timestamp, - updtime timestamp not null, + cretime timestamptz, + updtime timestamptz not null, constraint pk_o_order_detail primary key (id) ); create table s_orders ( - uuid varchar(255) not null, + uuid varchar(40) not null, constraint pk_s_orders primary key (uuid) ); create table s_order_items ( - uuid varchar(255) not null, + uuid varchar(40) not null, product_variant_uuid varchar(255), - order_uuid varchar(255), - quantity integer, + order_uuid varchar(40), + quantity integer not null, amount decimal(38), constraint pk_s_order_items primary key (uuid) ); @@ -1108,13 +1925,34 @@ create table s_order_items ( create table or_order_ship ( id serial not null, order_id integer, - ship_time timestamp, - cretime timestamp not null, - updtime timestamp not null, + ship_time timestamptz, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_or_order_ship primary key (id) ); +create table organisation ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_organisation primary key (id) +); + +create table oto_bchild ( + master_id bigserial not null, + child varchar(255), + constraint pk_oto_bchild primary key (master_id) +); + +create table oto_bmaster ( + id bigserial not null, + name varchar(255), + constraint pk_oto_bmaster primary key (id) +); + create table oto_child ( id serial not null, name varchar(255), @@ -1123,19 +1961,109 @@ create table oto_child ( constraint pk_oto_child primary key (id) ); +create table oto_cust ( + cid bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_oto_cust primary key (cid) +); + +create table oto_cust_address ( + aid bigserial not null, + line1 varchar(255), + line2 varchar(255), + line3 varchar(255), + customer_cid bigint, + version bigint not null, + constraint uq_oto_cust_address_customer_cid unique (customer_cid), + constraint pk_oto_cust_address primary key (aid) +); + create table oto_master ( id bigserial not null, name varchar(255), constraint pk_oto_master primary key (id) ); +create table oto_prime ( + pid bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_oto_prime primary key (pid) +); + +create table oto_prime_extra ( + eid bigint not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_prime_extra primary key (eid) +); + +create table oto_th_many ( + id bigserial not null, + oto_th_top_id bigint not null, + many varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_oto_th_many primary key (id) +); + +create table oto_th_one ( + id bigserial not null, + one boolean default false not null, + many_id bigint, + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint uq_oto_th_one_many_id unique (many_id), + constraint pk_oto_th_one primary key (id) +); + +create table oto_th_top ( + id bigserial not null, + topp varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_oto_th_top primary key (id) +); + +create table oto_ubprime ( + pid uuid not null, + name varchar(255), + version bigint not null, + constraint pk_oto_ubprime primary key (pid) +); + +create table oto_ubprime_extra ( + eid uuid not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_ubprime_extra primary key (eid) +); + +create table oto_uprime ( + pid uuid not null, + name varchar(255), + version bigint not null, + constraint pk_oto_uprime primary key (pid) +); + +create table oto_uprime_extra ( + eid uuid not null, + extra varchar(255), + version bigint not null, + constraint pk_oto_uprime_extra primary key (eid) +); + create table pfile ( id serial not null, name varchar(255), file_content_id integer, file_content2_id integer, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint uq_pfile_file_content_id unique (file_content_id), constraint uq_pfile_file_content2_id unique (file_content2_id), @@ -1145,14 +2073,14 @@ create table pfile ( create table pfile_content ( id serial not null, content bytea, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_pfile_content primary key (id) ); create table paggview ( - pview_id bytea, + pview_id uuid, amount integer not null, constraint uq_paggview_pview_id unique (pview_id) ); @@ -1183,13 +2111,25 @@ create table rawinherit_parent ( type varchar(31) not null, id bigserial not null, val integer, + more varchar(255), constraint pk_rawinherit_parent primary key (id) ); -create table rawinherit_parent_rawinherit_dat ( +create table rawinherit_parent_rawinherit_data ( rawinherit_parent_id bigint not null, rawinherit_data_id bigint not null, - constraint pk_rawinherit_parent_rawinher_0 primary key (rawinherit_parent_id,rawinherit_data_id) + constraint pk_rawinherit_parent_rawinherit_data primary key (rawinherit_parent_id,rawinherit_data_id) +); + +create table parent_person ( + identifier serial not null, + name varchar(255), + age integer, + some_bean_id integer, + parent_identifier integer, + family_name varchar(255), + address varchar(255), + constraint pk_parent_person primary key (identifier) ); create table c_participation ( @@ -1199,14 +2139,14 @@ create table c_participation ( conversation_id bigint not null, user_id bigint not null, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, - constraint ck_c_participation_type check (type in (0,1)), + when_created timestamptz not null, + when_modified timestamptz not null, + constraint ck_c_participation_type check ( type in (0,1)), constraint pk_c_participation primary key (id) ); create table mt_permission ( - id bytea not null, + id uuid not null, name varchar(255), constraint pk_mt_permission primary key (id) ); @@ -1214,8 +2154,8 @@ create table mt_permission ( create table persistent_file ( id serial not null, name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_persistent_file primary key (id) ); @@ -1224,10 +2164,10 @@ create table persistent_file_content ( id serial not null, persistent_file_id integer, content bytea, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, - constraint uq_persistent_file_content_pe_1 unique (persistent_file_id), + constraint uq_persistent_file_content_persistent_file_id unique (persistent_file_id), constraint pk_persistent_file_content primary key (id) ); @@ -1253,39 +2193,55 @@ create table phones ( constraint pk_phones primary key (id) ); +create table primary_revision ( + id bigint not null, + revision integer not null, + name varchar(255), + version bigint not null, + constraint pk_primary_revision primary key (id,revision) +); + create table o_product ( id serial not null, sku varchar(20), name varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, constraint pk_o_product primary key (id) ); create table pp ( - id bytea not null, + id uuid not null, name varchar(255), value varchar(100) not null, constraint pk_pp primary key (id) ); create table pp_to_ww ( - pp_id bytea not null, - ww_id bytea not null, + pp_id uuid not null, + ww_id uuid not null, constraint pk_pp_to_ww primary key (pp_id,ww_id) ); +create table question ( + id bigserial not null, + name varchar(255), + groupobjectid bigint, + sequence_number integer not null, + constraint pk_question primary key (id) +); + create table rcustomer ( - company varchar(255) not null, - name varchar(255) not null, + company varchar(127) not null, + name varchar(127) not null, description varchar(255), constraint pk_rcustomer primary key (company,name) ); create table r_orders ( - company varchar(255) not null, + company varchar(127) not null, order_number integer not null, - customername varchar(255), + customername varchar(127), item varchar(255), constraint pk_r_orders primary key (company,order_number) ); @@ -1305,28 +2261,29 @@ create table resourcefile ( constraint pk_resourcefile primary key (id) ); -create table mt_role ( - id bytea not null, - name varchar(50), - tenant_id bytea, - version bigint not null, - constraint pk_mt_role primary key (id) -); - -create table mt_role_permission ( - mt_role_id bytea not null, - mt_permission_id bytea not null, - constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) -); - create table em_role ( id bigserial not null, name varchar(255), constraint pk_em_role primary key (id) ); +create table mt_role ( + id uuid not null, + name varchar(50), + tenant_id uuid, + version bigint not null, + constraint pk_mt_role primary key (id) +); + +create table mt_role_permission ( + mt_role_id uuid not null, + mt_permission_id uuid not null, + constraint pk_mt_role_permission primary key (mt_role_id,mt_permission_id) +); + create table f_second ( id bigserial not null, + mod_name varchar(255), first bigint, title varchar(255), constraint uq_f_second_first unique (first), @@ -1338,10 +2295,10 @@ create table section ( article_id integer, type integer, content text, - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, - constraint ck_section_type check (type in (0,1)), + constraint ck_section_type check ( type in (0,1)), constraint pk_section primary key (id) ); @@ -1371,7 +2328,7 @@ create table some_enum_bean ( id bigserial not null, some_enum integer, name varchar(255), - constraint ck_some_enum_bean_some_enum check (some_enum in (0,1)), + constraint ck_some_enum_bean_some_enum check ( some_enum in (0,1)), constraint pk_some_enum_bean primary key (id) ); @@ -1390,23 +2347,22 @@ create table some_new_types_bean ( yr integer, yr_mth date, local_date date, - local_date_time timestamp, - offset_date_time timestamp, - zoned_date_time timestamp, - instant timestamp, + local_date_time timestamptz, + offset_date_time timestamptz, + zoned_date_time timestamptz, + instant timestamptz, zone_id varchar(60), zone_offset varchar(60), + path varchar(255), + period varchar(20), version bigint not null, - constraint ck_some_new_types_bean_dow check (dow in ('1','2','3','4','5','6','7')), - constraint ck_some_new_types_bean_mth check (mth in ('1','2','3','4','5','6','7','8','9','10','11','12')), + constraint ck_some_new_types_bean_dow check ( dow in (1,2,3,4,5,6,7)), + constraint ck_some_new_types_bean_mth check ( mth in (1,2,3,4,5,6,7,8,9,10,11,12)), constraint pk_some_new_types_bean primary key (id) ); create table some_period_bean ( id bigserial not null, - period_years integer, - period_months integer, - period_days integer, anniversary date, version bigint not null, constraint pk_some_period_bean primary key (id) @@ -1423,8 +2379,8 @@ create table sub_section ( id serial not null, section_id integer, title varchar(255), - cretime timestamp not null, - updtime timestamp not null, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_sub_section primary key (id) ); @@ -1436,6 +2392,12 @@ create table sub_type ( constraint pk_sub_type primary key (sub_type_id) ); +create table survey ( + id bigserial not null, + name varchar(255), + constraint pk_survey primary key (id) +); + create table tbytes_only ( id serial not null, content bytea, @@ -1444,11 +2406,39 @@ create table tbytes_only ( create table tcar ( type varchar(31) not null, - plate_no varchar(255) not null, + plate_no varchar(32) not null, truckload bigint, constraint pk_tcar primary key (plate_no) ); +create table tevent ( + id bigserial not null, + name varchar(255), + version bigint not null, + constraint pk_tevent primary key (id) +); + +create table tevent_many ( + id bigserial not null, + description varchar(255), + event_id bigint, + units integer not null, + amount float not null, + version bigint not null, + constraint pk_tevent_many primary key (id) +); + +create table tevent_one ( + id bigserial not null, + name varchar(255), + status integer, + event_id bigint, + version bigint not null, + constraint ck_tevent_one_status check ( status in (0,1)), + constraint uq_tevent_one_event_id unique (event_id), + constraint pk_tevent_one primary key (id) +); + create table tint_root ( my_type integer not null, id serial not null, @@ -1475,7 +2465,7 @@ create table t_oneb ( id serial not null, name varchar(255), description varchar(255), - active boolean, + active boolean default false not null, constraint pk_t_oneb primary key (id) ); @@ -1483,9 +2473,11 @@ create table t_detail_with_other_namexxxyy ( id integer not null, name varchar(255), description varchar(255), - active boolean, + some_unique_value varchar(127), + active boolean default false not null, master_id integer, - constraint pk_t_detail_with_other_namexx_0 primary key (id) + constraint uq_t_detail_with_other_namexxxyy_some_unique_value unique (some_unique_value), + constraint pk_t_detail_with_other_namexxxyy primary key (id) ); create sequence t_atable_detail_seq; @@ -1493,7 +2485,7 @@ create table ts_detail_two ( id serial not null, name varchar(255), description varchar(255), - active boolean, + active boolean default false not null, master_id integer, constraint pk_ts_detail_two primary key (id) ); @@ -1502,7 +2494,7 @@ create table t_atable_thatisrelatively ( id integer not null, name varchar(255), description varchar(255), - active boolean, + active boolean default false not null, constraint pk_t_atable_thatisrelatively primary key (id) ); create sequence t_atable_master_seq; @@ -1511,19 +2503,19 @@ create table ts_master_two ( id serial not null, name varchar(255), description varchar(255), - active boolean, + active boolean default false not null, constraint pk_ts_master_two primary key (id) ); create table tuuid_entity ( - id bytea not null, + id uuid not null, name varchar(255), constraint pk_tuuid_entity primary key (id) ); create table twheel ( id bigserial not null, - owner_plate_no varchar(255) not null, + owner_plate_no varchar(32) not null, constraint pk_twheel primary key (id) ); @@ -1535,18 +2527,21 @@ create table twith_pre_insert ( ); create table mt_tenant ( - id bytea not null, + id uuid not null, name varchar(255), version bigint not null, constraint pk_mt_tenant primary key (id) ); -create table sa_tire ( - id bigint not null, - version integer not null, - constraint pk_sa_tire primary key (id) +create table test_annotation_base_entity ( + direct varchar(255), + meta varchar(255), + mixed varchar(255), + constraint_annotation varchar(40), + null1 varchar(255) not null, + null2 varchar(255), + null3 varchar(255) ); -create sequence sa_tire_seq; create table tire ( id bigint not null, @@ -1557,14 +2552,21 @@ create table tire ( ); create sequence tire_seq; +create table sa_tire ( + id bigint not null, + version integer not null, + constraint pk_sa_tire primary key (id) +); +create sequence sa_tire_seq; + create table trip ( id serial not null, vehicle_driver_id integer, destination varchar(255), address_id smallint, - star_date timestamp, - cretime timestamp not null, - updtime timestamp not null, + star_date timestamptz, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_trip primary key (id) ); @@ -1584,6 +2586,14 @@ create table type ( constraint pk_type primary key (customer,type) ); +create table tz_bean ( + id bigserial not null, + moda varchar(255), + ts timestamptz, + tstz timestamptz, + constraint pk_tz_bean primary key (id) +); + create table ut_detail ( id serial not null, utmaster_id integer not null, @@ -1603,22 +2613,29 @@ create table ut_master ( ); create table uuone ( - id bytea not null, + id uuid not null, name varchar(255), constraint pk_uuone primary key (id) ); create table uutwo ( - id bytea not null, + id uuid not null, name varchar(255), - master_id bytea, + master_id uuid, constraint pk_uutwo primary key (id) ); -create table em_user ( +create table c_user ( id bigserial not null, + inactive boolean default false not null, name varchar(255), - constraint pk_em_user primary key (id) + email varchar(255), + password_hash varchar(255), + group_id bigint, + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + constraint pk_c_user primary key (id) ); create table tx_user ( @@ -1627,16 +2644,17 @@ create table tx_user ( constraint pk_tx_user primary key (id) ); -create table c_user ( +create table g_user ( id bigserial not null, - inactive boolean, - name varchar(255), - email varchar(255), - group_id bigint, + username varchar(255), version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, - constraint pk_c_user primary key (id) + constraint pk_g_user primary key (id) +); + +create table em_user ( + id bigserial not null, + name varchar(255), + constraint pk_em_user primary key (id) ); create table oto_user ( @@ -1644,8 +2662,8 @@ create table oto_user ( name varchar(255), account_id bigint not null, version bigint not null, - when_created timestamp not null, - when_modified timestamp not null, + when_created timestamptz not null, + when_modified timestamptz not null, constraint uq_oto_user_account_id unique (account_id), constraint pk_oto_user primary key (id) ); @@ -1660,14 +2678,17 @@ create table vehicle ( dtype varchar(3) not null, id serial not null, license_number varchar(255), - registration_date timestamp, - cretime timestamp not null, - updtime timestamp not null, + registration_date timestamptz, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, - truck_ref_id integer, - capacity float, + siz varchar(1), driver varchar(255), car_ref_id integer, + notes varchar(255), + truck_ref_id integer, + capacity float, + constraint ck_vehicle_siz check ( siz in ('S','M','L','H')), constraint pk_vehicle primary key (id) ); @@ -1676,9 +2697,9 @@ create table vehicle_driver ( name varchar(255), vehicle_id integer, address_id smallint, - license_issued_on timestamp, - cretime timestamp not null, - updtime timestamp not null, + license_issued_on timestamptz, + cretime timestamptz not null, + updtime timestamptz not null, version bigint not null, constraint pk_vehicle_driver primary key (id) ); @@ -1704,13 +2725,6 @@ create table sa_wheel ( ); create sequence sa_wheel_seq; -create table sp_car_wheel ( - id bigint not null, - version integer not null, - constraint pk_sp_car_wheel primary key (id) -); -create sequence sp_car_wheel_seq; - create table wheel ( id bigint not null, version integer not null, @@ -1718,10 +2732,29 @@ create table wheel ( ); create sequence wheel_seq; +create table sp_car_wheel ( + id bigint not null, + version integer not null, + constraint pk_sp_car_wheel primary key (id) +); +create sequence sp_car_wheel_seq; + +create table g_who_props_otm ( + id bigserial not null, + name varchar(255), + version bigint not null, + when_created timestamptz not null, + when_modified timestamptz not null, + who_created_id bigint, + who_modified_id bigint, + constraint pk_g_who_props_otm primary key (id) +); + create table with_zero ( id bigserial not null, name varchar(255), parent_id integer, + lang varchar(2) default 'en' not null, version bigint not null, constraint pk_with_zero primary key (id) ); @@ -1733,8 +2766,8 @@ create table parent ( ); create table wview ( - id bytea not null, - name varchar(255) not null, + id uuid not null, + name varchar(127) not null, constraint uq_wview_name unique (name), constraint pk_wview primary key (id) ); @@ -1746,341 +2779,684 @@ create table zones ( constraint pk_zones primary key (id) ); -alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id) on delete restrict on update restrict; +create index ix_contact_last_name_first_name on contact (last_name,first_name); +create index ix_e_basic_name on e_basic (name); create index ix_bar_foo_id on bar (foo_id); +alter table bar add constraint fk_bar_foo_id foreign key (foo_id) references foo (foo_id) on delete restrict on update restrict; + +create index ix_addr_employee_id on addr (employee_id); +alter table addr add constraint fk_addr_employee_id foreign key (employee_id) references empl (id) on delete restrict on update restrict; -alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code) on delete restrict on update restrict; create index ix_o_address_country_code on o_address (country_code); +alter table o_address add constraint fk_o_address_country_code foreign key (country_code) references o_country (code) on delete restrict on update restrict; -alter table animals add constraint fk_animals_shelter_id foreign key (shelter_id) references animal_shelter (id) on delete restrict on update restrict; -create index ix_animals_shelter_id on animals (shelter_id); +alter table album add constraint fk_album_cover_id foreign key (cover_id) references cover (id) on delete restrict on update restrict; -alter table attribute add constraint fk_attribute_attribute_holder_1 foreign key (attribute_holder_id) references attribute_holder (id) on delete restrict on update restrict; -create index ix_attribute_attribute_holder_1 on attribute (attribute_holder_id); +create index ix_animal_shelter_id on animal (shelter_id); +alter table animal add constraint fk_animal_shelter_id foreign key (shelter_id) references animal_shelter (id) on delete restrict on update restrict; + +create index ix_attribute_attribute_holder_id on attribute (attribute_holder_id); +alter table attribute add constraint fk_attribute_attribute_holder_id foreign key (attribute_holder_id) references attribute_holder (id) on delete restrict on update restrict; -alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id) on delete restrict on update restrict; create index ix_bbookmark_user_id on bbookmark (user_id); +alter table bbookmark add constraint fk_bbookmark_user_id foreign key (user_id) references bbookmark_user (id) on delete restrict on update restrict; + +create index ix_bsite_user_site_id on bsite_user (site_id); +alter table bsite_user add constraint fk_bsite_user_site_id foreign key (site_id) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_user_id on bsite_user (user_id); +alter table bsite_user add constraint fk_bsite_user_user_id foreign key (user_id) references buser (id) on delete restrict on update restrict; + +create index ix_bsite_user_b_site on bsite_user_b (site); +alter table bsite_user_b add constraint fk_bsite_user_b_site foreign key (site) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_b_usr on bsite_user_b (usr); +alter table bsite_user_b add constraint fk_bsite_user_b_usr foreign key (usr) references buser (id) on delete restrict on update restrict; + +create index ix_bsite_user_c_site_uid on bsite_user_c (site_uid); +alter table bsite_user_c add constraint fk_bsite_user_c_site_uid foreign key (site_uid) references bsite (id) on delete restrict on update restrict; + +create index ix_bsite_user_c_user_uid on bsite_user_c (user_uid); +alter table bsite_user_c add constraint fk_bsite_user_c_user_uid foreign key (user_uid) references buser (id) on delete restrict on update restrict; alter table drel_booking add constraint fk_drel_booking_agent_invoice foreign key (agent_invoice) references drel_invoice (id) on delete restrict on update restrict; alter table drel_booking add constraint fk_drel_booking_client_invoice foreign key (client_invoice) references drel_invoice (id) on delete restrict on update restrict; -alter table ckey_detail add constraint fk_ckey_detail_ckey_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key) on delete restrict on update restrict; -create index ix_ckey_detail_one_key_two_key on ckey_detail (one_key,two_key); +create index ix_ckey_detail_parent on ckey_detail (one_key,two_key); +alter table ckey_detail add constraint fk_ckey_detail_parent foreign key (one_key,two_key) references ckey_parent (one_key,two_key) on delete restrict on update restrict; -alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id) on delete restrict on update restrict; create index ix_ckey_parent_assoc_id on ckey_parent (assoc_id); +alter table ckey_parent add constraint fk_ckey_parent_assoc_id foreign key (assoc_id) references ckey_assoc (id) on delete restrict on update restrict; -alter table calculation_result add constraint fk_calculation_result_product_1 foreign key (product_configuration_id) references configuration (id) on delete restrict on update restrict; -create index ix_calculation_result_product_1 on calculation_result (product_configuration_id); +create index ix_calculation_result_product_configuration_id on calculation_result (product_configuration_id); +alter table calculation_result add constraint fk_calculation_result_product_configuration_id foreign key (product_configuration_id) references configuration (id) on delete restrict on update restrict; -alter table calculation_result add constraint fk_calculation_result_group_c_2 foreign key (group_configuration_id) references configuration (id) on delete restrict on update restrict; -create index ix_calculation_result_group_c_2 on calculation_result (group_configuration_id); +create index ix_calculation_result_group_configuration_id on calculation_result (group_configuration_id); +alter table calculation_result add constraint fk_calculation_result_group_configuration_id foreign key (group_configuration_id) references configuration (id) on delete restrict on update restrict; +create index ix_sp_car_car_wheels_sp_car_car on sp_car_car_wheels (car); alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_car foreign key (car) references sp_car_car (id) on delete restrict on update restrict; -create index ix_sp_car_car_wheels_car on sp_car_car_wheels (car); -alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_w_2 foreign key (wheel) references sp_car_wheel (id) on delete restrict on update restrict; -create index ix_sp_car_car_wheels_wheel on sp_car_car_wheels (wheel); +create index ix_sp_car_car_wheels_sp_car_wheel on sp_car_car_wheels (wheel); +alter table sp_car_car_wheels add constraint fk_sp_car_car_wheels_sp_car_wheel foreign key (wheel) references sp_car_wheel (id) on delete restrict on update restrict; + +create index ix_car_accessory_fuse_id on car_accessory (fuse_id); +alter table car_accessory add constraint fk_car_accessory_fuse_id foreign key (fuse_id) references car_fuse (id) on delete restrict on update restrict; -alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id) on delete restrict on update restrict; create index ix_car_accessory_car_id on car_accessory (car_id); +alter table car_accessory add constraint fk_car_accessory_car_id foreign key (car_id) references vehicle (id) on delete restrict on update restrict; -alter table configuration add constraint fk_configuration_configuratio_1 foreign key (configurations_id) references configurations (id) on delete restrict on update restrict; -create index ix_configuration_configuratio_1 on configuration (configurations_id); +create index ix_category_surveyobjectid on category (surveyobjectid); +alter table category add constraint fk_category_surveyobjectid foreign key (surveyobjectid) references survey (id) on delete restrict on update restrict; + +create index ix_child_person_some_bean_id on child_person (some_bean_id); +alter table child_person add constraint fk_child_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_child_person_parent_identifier on child_person (parent_identifier); +alter table child_person add constraint fk_child_person_parent_identifier foreign key (parent_identifier) references parent_person (identifier) on delete restrict on update restrict; + +create index ix_configuration_configurations_id on configuration (configurations_id); +alter table configuration add constraint fk_configuration_configurations_id foreign key (configurations_id) references configurations (id) on delete restrict on update restrict; -alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id) on delete restrict on update restrict; create index ix_contact_customer_id on contact (customer_id); +alter table contact add constraint fk_contact_customer_id foreign key (customer_id) references o_customer (id) on delete restrict on update restrict; -alter table contact add constraint fk_contact_group_id foreign key (group_id) references contact_group (id) on delete restrict on update restrict; create index ix_contact_group_id on contact (group_id); +alter table contact add constraint fk_contact_group_id foreign key (group_id) references contact_group (id) on delete restrict on update restrict; -alter table contact_note add constraint fk_contact_note_contact_id foreign key (contact_id) references contact (id) on delete restrict on update restrict; create index ix_contact_note_contact_id on contact_note (contact_id); +alter table contact_note add constraint fk_contact_note_contact_id foreign key (contact_id) references contact (id) on delete restrict on update restrict; -alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; create index ix_c_conversation_group_id on c_conversation (group_id); +alter table c_conversation add constraint fk_c_conversation_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; -alter table o_customer add constraint fk_o_customer_billing_address_1 foreign key (billing_address_id) references o_address (id) on delete restrict on update restrict; -create index ix_o_customer_billing_address_1 on o_customer (billing_address_id); +create index ix_o_customer_billing_address_id on o_customer (billing_address_id); +alter table o_customer add constraint fk_o_customer_billing_address_id foreign key (billing_address_id) references o_address (id) on delete restrict on update restrict; -alter table o_customer add constraint fk_o_customer_shipping_addres_2 foreign key (shipping_address_id) references o_address (id) on delete restrict on update restrict; -create index ix_o_customer_shipping_addres_2 on o_customer (shipping_address_id); +create index ix_o_customer_shipping_address_id on o_customer (shipping_address_id); +alter table o_customer add constraint fk_o_customer_shipping_address_id foreign key (shipping_address_id) references o_address (id) on delete restrict on update restrict; + +create index ix_dcredit_drol_dcredit on dcredit_drol (dcredit_id); +alter table dcredit_drol add constraint fk_dcredit_drol_dcredit foreign key (dcredit_id) references dcredit (id) on delete restrict on update restrict; + +create index ix_dcredit_drol_drol on dcredit_drol (drol_id); +alter table dcredit_drol add constraint fk_dcredit_drol_drol foreign key (drol_id) references drol (id) on delete restrict on update restrict; + +create index ix_drot_drol_drot on drot_drol (drot_id); +alter table drot_drol add constraint fk_drot_drol_drot foreign key (drot_id) references drot (id) on delete restrict on update restrict; + +create index ix_drot_drol_drol on drot_drol (drol_id); +alter table drot_drol add constraint fk_drot_drol_drol foreign key (drol_id) references drol (id) on delete restrict on update restrict; + +create index ix_dfk_cascade_one_id on dfk_cascade (one_id); +alter table dfk_cascade add constraint fk_dfk_cascade_one_id foreign key (one_id) references dfk_cascade_one (id) on delete cascade on update cascade; + +create index ix_dfk_set_null_one_id on dfk_set_null (one_id); +alter table dfk_set_null add constraint fk_dfk_set_null_one_id foreign key (one_id) references dfk_one (id) on delete set null on update set null; + +alter table doc add constraint fk_doc_id foreign key (id) references doc_draft (id) on delete restrict on update restrict; + +create index ix_doc_link_doc on doc_link (doc_id); +alter table doc_link add constraint fk_doc_link_doc foreign key (doc_id) references doc (id) on delete restrict on update restrict; + +create index ix_doc_link_link on doc_link (link_id); +alter table doc_link add constraint fk_doc_link_link foreign key (link_id) references link (id) on delete restrict on update restrict; + +alter table document add constraint fk_document_id foreign key (id) references document_draft (id) on delete restrict on update restrict; + +create index ix_document_organisation_id on document (organisation_id); +alter table document add constraint fk_document_organisation_id foreign key (organisation_id) references organisation (id) on delete restrict on update restrict; + +create index ix_document_draft_organisation_id on document_draft (organisation_id); +alter table document_draft add constraint fk_document_draft_organisation_id foreign key (organisation_id) references organisation (id) on delete restrict on update restrict; + +create index ix_document_media_document_id on document_media (document_id); +alter table document_media add constraint fk_document_media_document_id foreign key (document_id) references document (id) on delete restrict on update restrict; + +create index ix_document_media_draft_document_id on document_media_draft (document_id); +alter table document_media_draft add constraint fk_document_media_draft_document_id foreign key (document_id) references document_draft (id) on delete restrict on update restrict; + +create index ix_ebasic_json_map_detail_owner_id on ebasic_json_map_detail (owner_id); +alter table ebasic_json_map_detail add constraint fk_ebasic_json_map_detail_owner_id foreign key (owner_id) references ebasic_json_map (id) on delete restrict on update restrict; + +create index ix_ebasic_no_sdchild_owner_id on ebasic_no_sdchild (owner_id); +alter table ebasic_no_sdchild add constraint fk_ebasic_no_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id) on delete restrict on update restrict; + +create index ix_ebasic_sdchild_owner_id on ebasic_sdchild (owner_id); +alter table ebasic_sdchild add constraint fk_ebasic_sdchild_owner_id foreign key (owner_id) references ebasic_soft_delete (id) on delete restrict on update restrict; -alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id) on delete restrict on update restrict; create index ix_eemb_inner_outer_id on eemb_inner (outer_id); +alter table eemb_inner add constraint fk_eemb_inner_outer_id foreign key (outer_id) references eemb_outer (id) on delete restrict on update restrict; -alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id) on delete restrict on update restrict; create index ix_einvoice_person_id on einvoice (person_id); +alter table einvoice add constraint fk_einvoice_person_id foreign key (person_id) references eperson (id) on delete restrict on update restrict; -alter table enull_collection_detail add constraint fk_enull_collection_detail_en_1 foreign key (enull_collection_id) references enull_collection (id) on delete restrict on update restrict; -create index ix_enull_collection_detail_en_1 on enull_collection_detail (enull_collection_id); +create index ix_enull_collection_detail_enull_collection_id on enull_collection_detail (enull_collection_id); +alter table enull_collection_detail add constraint fk_enull_collection_detail_enull_collection_id foreign key (enull_collection_id) references enull_collection (id) on delete restrict on update restrict; -alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id) on delete restrict on update restrict; create index ix_eopt_one_a_b_id on eopt_one_a (b_id); +alter table eopt_one_a add constraint fk_eopt_one_a_b_id foreign key (b_id) references eopt_one_b (id) on delete restrict on update restrict; -alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id) on delete restrict on update restrict; create index ix_eopt_one_b_c_id on eopt_one_b (c_id); +alter table eopt_one_b add constraint fk_eopt_one_b_c_id foreign key (c_id) references eopt_one_c (id) on delete restrict on update restrict; -alter table evanilla_collection_detail add constraint fk_evanilla_collection_detail_1 foreign key (evanilla_collection_id) references evanilla_collection (id) on delete restrict on update restrict; -create index ix_evanilla_collection_detail_1 on evanilla_collection_detail (evanilla_collection_id); +create index ix_esoft_del_book_lend_by_id on esoft_del_book (lend_by_id); +alter table esoft_del_book add constraint fk_esoft_del_book_lend_by_id foreign key (lend_by_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_esoft_del_user_esoft_del_book on esoft_del_book_esoft_del_user (esoft_del_book_id); +alter table esoft_del_book_esoft_del_user add constraint fk_esoft_del_book_esoft_del_user_esoft_del_book foreign key (esoft_del_book_id) references esoft_del_book (id) on delete restrict on update restrict; + +create index ix_esoft_del_book_esoft_del_user_esoft_del_user on esoft_del_book_esoft_del_user (esoft_del_user_id); +alter table esoft_del_book_esoft_del_user add constraint fk_esoft_del_book_esoft_del_user_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_down_esoft_del_mid_id on esoft_del_down (esoft_del_mid_id); +alter table esoft_del_down add constraint fk_esoft_del_down_esoft_del_mid_id foreign key (esoft_del_mid_id) references esoft_del_mid (id) on delete restrict on update restrict; + +create index ix_esoft_del_mid_top_id on esoft_del_mid (top_id); +alter table esoft_del_mid add constraint fk_esoft_del_mid_top_id foreign key (top_id) references esoft_del_top (id) on delete restrict on update restrict; + +create index ix_esoft_del_mid_up_id on esoft_del_mid (up_id); +alter table esoft_del_mid add constraint fk_esoft_del_mid_up_id foreign key (up_id) references esoft_del_up (id) on delete restrict on update restrict; + +alter table esoft_del_one_a add constraint fk_esoft_del_one_a_oneb_id foreign key (oneb_id) references esoft_del_one_b (id) on delete restrict on update restrict; + +create index ix_esoft_del_role_esoft_del_user_esoft_del_role on esoft_del_role_esoft_del_user (esoft_del_role_id); +alter table esoft_del_role_esoft_del_user add constraint fk_esoft_del_role_esoft_del_user_esoft_del_role foreign key (esoft_del_role_id) references esoft_del_role (id) on delete restrict on update restrict; + +create index ix_esoft_del_role_esoft_del_user_esoft_del_user on esoft_del_role_esoft_del_user (esoft_del_user_id); +alter table esoft_del_role_esoft_del_user add constraint fk_esoft_del_role_esoft_del_user_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_user_esoft_del_role_esoft_del_user on esoft_del_user_esoft_del_role (esoft_del_user_id); +alter table esoft_del_user_esoft_del_role add constraint fk_esoft_del_user_esoft_del_role_esoft_del_user foreign key (esoft_del_user_id) references esoft_del_user (id) on delete restrict on update restrict; + +create index ix_esoft_del_user_esoft_del_role_esoft_del_role on esoft_del_user_esoft_del_role (esoft_del_role_id); +alter table esoft_del_user_esoft_del_role add constraint fk_esoft_del_user_esoft_del_role_esoft_del_role foreign key (esoft_del_role_id) references esoft_del_role (id) on delete restrict on update restrict; + +create index ix_rawinherit_uncle_parent_id on rawinherit_uncle (parent_id); +alter table rawinherit_uncle add constraint fk_rawinherit_uncle_parent_id foreign key (parent_id) references rawinherit_parent (id) on delete restrict on update restrict; + +create index ix_evanilla_collection_detail_evanilla_collection_id on evanilla_collection_detail (evanilla_collection_id); +alter table evanilla_collection_detail add constraint fk_evanilla_collection_detail_evanilla_collection_id foreign key (evanilla_collection_id) references evanilla_collection (id) on delete restrict on update restrict; -alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id) on delete restrict on update restrict; create index ix_td_child_parent_id on td_child (parent_id); +alter table td_child add constraint fk_td_child_parent_id foreign key (parent_id) references td_parent (parent_id) on delete restrict on update restrict; + +create index ix_empl_default_address_id on empl (default_address_id); +alter table empl add constraint fk_empl_default_address_id foreign key (default_address_id) references addr (id) on delete restrict on update restrict; + +create index ix_grand_parent_person_some_bean_id on grand_parent_person (some_bean_id); +alter table grand_parent_person add constraint fk_grand_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_survey_group_categoryobjectid on survey_group (categoryobjectid); +alter table survey_group add constraint fk_survey_group_categoryobjectid foreign key (categoryobjectid) references category (id) on delete restrict on update restrict; + +create index ix_hx_link_doc_hx_link on hx_link_doc (hx_link_id); +alter table hx_link_doc add constraint fk_hx_link_doc_hx_link foreign key (hx_link_id) references hx_link (id) on delete restrict on update restrict; + +create index ix_hx_link_doc_he_doc on hx_link_doc (he_doc_id); +alter table hx_link_doc add constraint fk_hx_link_doc_he_doc foreign key (he_doc_id) references he_doc (id) on delete restrict on update restrict; + +create index ix_hi_link_doc_hi_link on hi_link_doc (hi_link_id); +alter table hi_link_doc add constraint fk_hi_link_doc_hi_link foreign key (hi_link_id) references hi_link (id) on delete restrict on update restrict; + +create index ix_hi_link_doc_hi_doc on hi_link_doc (hi_doc_id); +alter table hi_link_doc add constraint fk_hi_link_doc_hi_doc foreign key (hi_doc_id) references hi_doc (id) on delete restrict on update restrict; -alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id) on delete restrict on update restrict; create index ix_imrelated_owner_id on imrelated (owner_id); +alter table imrelated add constraint fk_imrelated_owner_id foreign key (owner_id) references imroot (id) on delete restrict on update restrict; -alter table info_contact add constraint fk_info_contact_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; create index ix_info_contact_company_id on info_contact (company_id); +alter table info_contact add constraint fk_info_contact_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; alter table info_customer add constraint fk_info_customer_company_id foreign key (company_id) references info_company (id) on delete restrict on update restrict; alter table inner_report add constraint fk_inner_report_forecast_id foreign key (forecast_id) references stockforecast (id) on delete restrict on update restrict; -alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id) on delete restrict on update restrict; create index ix_drel_invoice_booking on drel_invoice (booking); +alter table drel_invoice add constraint fk_drel_invoice_booking foreign key (booking) references drel_booking (id) on delete restrict on update restrict; -alter table item add constraint fk_item_type foreign key (customer,type) references type (customer,type) on delete restrict on update restrict; -create index ix_item_customer_type on item (customer,type); +create index ix_item_etype on item (customer,type); +alter table item add constraint fk_item_etype foreign key (customer,type) references type (customer,type) on delete restrict on update restrict; -alter table item add constraint fk_item_region foreign key (customer,region) references region (customer,type) on delete restrict on update restrict; -create index ix_item_customer_region on item (customer,region); +create index ix_item_eregion on item (customer,region); +alter table item add constraint fk_item_eregion foreign key (customer,region) references region (customer,type) on delete restrict on update restrict; +alter table trainer_monkey add constraint fk_trainer_monkey_trainer foreign key (trainer_tid) references trainer (tid) on delete restrict on update restrict; + +alter table trainer_monkey add constraint fk_trainer_monkey_monkey foreign key (monkey_mid) references monkey (mid) on delete restrict on update restrict; + +alter table troop_monkey add constraint fk_troop_monkey_troop foreign key (troop_pid) references troop (pid) on delete restrict on update restrict; + +alter table troop_monkey add constraint fk_troop_monkey_monkey foreign key (monkey_mid) references monkey (mid) on delete restrict on update restrict; + +create index ix_l2_cldf_reset_bean_child_parent_id on l2_cldf_reset_bean_child (parent_id); +alter table l2_cldf_reset_bean_child add constraint fk_l2_cldf_reset_bean_child_parent_id foreign key (parent_id) references l2_cldf_reset_bean (id) on delete restrict on update restrict; + +create index ix_level1_level4_level1 on level1_level4 (level1_id); alter table level1_level4 add constraint fk_level1_level4_level1 foreign key (level1_id) references level1 (id) on delete restrict on update restrict; -create index ix_level1_level4_level1_id on level1_level4 (level1_id); +create index ix_level1_level4_level4 on level1_level4 (level4_id); alter table level1_level4 add constraint fk_level1_level4_level4 foreign key (level4_id) references level4 (id) on delete restrict on update restrict; -create index ix_level1_level4_level4_id on level1_level4 (level4_id); +create index ix_level1_level2_level1 on level1_level2 (level1_id); alter table level1_level2 add constraint fk_level1_level2_level1 foreign key (level1_id) references level1 (id) on delete restrict on update restrict; -create index ix_level1_level2_level1_id on level1_level2 (level1_id); +create index ix_level1_level2_level2 on level1_level2 (level2_id); alter table level1_level2 add constraint fk_level1_level2_level2 foreign key (level2_id) references level2 (id) on delete restrict on update restrict; -create index ix_level1_level2_level2_id on level1_level2 (level2_id); +create index ix_level2_level3_level2 on level2_level3 (level2_id); alter table level2_level3 add constraint fk_level2_level3_level2 foreign key (level2_id) references level2 (id) on delete restrict on update restrict; -create index ix_level2_level3_level2_id on level2_level3 (level2_id); +create index ix_level2_level3_level3 on level2_level3 (level3_id); alter table level2_level3 add constraint fk_level2_level3_level3 foreign key (level3_id) references level3 (id) on delete restrict on update restrict; -create index ix_level2_level3_level3_id on level2_level3 (level3_id); -alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_la_1 foreign key (la_attr_value_id) references la_attr_value (id) on delete restrict on update restrict; -create index ix_la_attr_value_attribute_la_1 on la_attr_value_attribute (la_attr_value_id); +alter table link add constraint fk_link_id foreign key (id) references link_draft (id) on delete restrict on update restrict; -alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_at_2 foreign key (attribute_id) references attribute (id) on delete restrict on update restrict; -create index ix_la_attr_value_attribute_at_2 on la_attr_value_attribute (attribute_id); +create index ix_la_attr_value_attribute_la_attr_value on la_attr_value_attribute (la_attr_value_id); +alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_la_attr_value foreign key (la_attr_value_id) references la_attr_value (id) on delete restrict on update restrict; + +create index ix_la_attr_value_attribute_attribute on la_attr_value_attribute (attribute_id); +alter table la_attr_value_attribute add constraint fk_la_attr_value_attribute_attribute foreign key (attribute_id) references attribute (id) on delete restrict on update restrict; -alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id) on delete restrict on update restrict; create index ix_mprinter_current_state_id on mprinter (current_state_id); +alter table mprinter add constraint fk_mprinter_current_state_id foreign key (current_state_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_cyan_id foreign key (last_swap_cyan_id) references mprinter_state (id) on delete restrict on update restrict; -alter table mprinter add constraint fk_mprinter_last_swap_magenta_3 foreign key (last_swap_magenta_id) references mprinter_state (id) on delete restrict on update restrict; +alter table mprinter add constraint fk_mprinter_last_swap_magenta_id foreign key (last_swap_magenta_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_yellow_id foreign key (last_swap_yellow_id) references mprinter_state (id) on delete restrict on update restrict; alter table mprinter add constraint fk_mprinter_last_swap_black_id foreign key (last_swap_black_id) references mprinter_state (id) on delete restrict on update restrict; -alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id) on delete restrict on update restrict; create index ix_mprinter_state_printer_id on mprinter_state (printer_id); +alter table mprinter_state add constraint fk_mprinter_state_printer_id foreign key (printer_id) references mprinter (id) on delete restrict on update restrict; -alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_id) references mmedia (id) on delete restrict on update restrict; create index ix_mprofile_picture_id on mprofile (picture_id); +alter table mprofile add constraint fk_mprofile_picture_id foreign key (picture_id) references mmedia (id) on delete restrict on update restrict; +create index ix_mrole_muser_mrole on mrole_muser (mrole_roleid); alter table mrole_muser add constraint fk_mrole_muser_mrole foreign key (mrole_roleid) references mrole (roleid) on delete restrict on update restrict; -create index ix_mrole_muser_mrole_roleid on mrole_muser (mrole_roleid); +create index ix_mrole_muser_muser on mrole_muser (muser_userid); alter table mrole_muser add constraint fk_mrole_muser_muser foreign key (muser_userid) references muser (userid) on delete restrict on update restrict; -create index ix_mrole_muser_muser_userid on mrole_muser (muser_userid); -alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id) on delete restrict on update restrict; create index ix_muser_user_type_id on muser (user_type_id); +alter table muser add constraint fk_muser_user_type_id foreign key (user_type_id) references muser_type (id) on delete restrict on update restrict; + +create index ix_mail_user_inbox_mail_user on mail_user_inbox (mail_user_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_user foreign key (mail_user_id) references mail_user (id) on delete restrict on update restrict; + +create index ix_mail_user_inbox_mail_box on mail_user_inbox (mail_box_id); +alter table mail_user_inbox add constraint fk_mail_user_inbox_mail_box foreign key (mail_box_id) references mail_box (id) on delete restrict on update restrict; + +create index ix_mail_user_outbox_mail_user on mail_user_outbox (mail_user_id); +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_user foreign key (mail_user_id) references mail_user (id) on delete restrict on update restrict; + +create index ix_mail_user_outbox_mail_box on mail_user_outbox (mail_box_id); +alter table mail_user_outbox add constraint fk_mail_user_outbox_mail_box foreign key (mail_box_id) references mail_box (id) on delete restrict on update restrict; -alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; create index ix_c_message_conversation_id on c_message (conversation_id); +alter table c_message add constraint fk_c_message_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; create index ix_c_message_user_id on c_message (user_id); +alter table c_message add constraint fk_c_message_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; -alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_u_1 foreign key (mnoc_user_user_id) references mnoc_user (user_id) on delete restrict on update restrict; -create index ix_mnoc_user_mnoc_role_mnoc_u_1 on mnoc_user_mnoc_role (mnoc_user_user_id); +create index ix_mnoc_user_mnoc_role_mnoc_user on mnoc_user_mnoc_role (mnoc_user_user_id); +alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_user foreign key (mnoc_user_user_id) references mnoc_user (user_id) on delete restrict on update restrict; -alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_r_2 foreign key (mnoc_role_role_id) references mnoc_role (role_id) on delete restrict on update restrict; -create index ix_mnoc_user_mnoc_role_mnoc_r_2 on mnoc_user_mnoc_role (mnoc_role_role_id); +create index ix_mnoc_user_mnoc_role_mnoc_role on mnoc_user_mnoc_role (mnoc_role_role_id); +alter table mnoc_user_mnoc_role add constraint fk_mnoc_user_mnoc_role_mnoc_role foreign key (mnoc_role_role_id) references mnoc_role (role_id) on delete restrict on update restrict; + +create index ix_mny_b_a_id on mny_b (a_id); +alter table mny_b add constraint fk_mny_b_a_id foreign key (a_id) references mny_a (id) on delete restrict on update restrict; + +create index ix_mny_b_mny_c_mny_b on mny_b_mny_c (mny_b_id); +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_b foreign key (mny_b_id) references mny_b (id) on delete restrict on update restrict; + +create index ix_mny_b_mny_c_mny_c on mny_b_mny_c (mny_c_id); +alter table mny_b_mny_c add constraint fk_mny_b_mny_c_mny_c foreign key (mny_c_id) references mny_c (id) on delete restrict on update restrict; + +create index ix_subtopics_mny_topic_1 on subtopics (topic); +alter table subtopics add constraint fk_subtopics_mny_topic_1 foreign key (topic) references mny_topic (id) on delete restrict on update restrict; + +create index ix_subtopics_mny_topic_2 on subtopics (subtopic); +alter table subtopics add constraint fk_subtopics_mny_topic_2 foreign key (subtopic) references mny_topic (id) on delete restrict on update restrict; -alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id) on delete restrict on update restrict; create index ix_mp_role_mp_user_id on mp_role (mp_user_id); +alter table mp_role add constraint fk_mp_role_mp_user_id foreign key (mp_user_id) references mp_user (id) on delete restrict on update restrict; -alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_pare_1 foreign key (parent_id) references my_lob_size (id) on delete restrict on update restrict; -create index ix_my_lob_size_join_many_pare_1 on my_lob_size_join_many (parent_id); +create index ix_ms_many_a_many_b_ms_many_a on ms_many_a_many_b (ms_many_a_aid); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid) on delete restrict on update restrict; -alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_ca_1 foreign key (o_cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; -create index ix_o_cached_bean_country_o_ca_1 on o_cached_bean_country (o_cached_bean_id); +create index ix_ms_many_a_many_b_ms_many_b on ms_many_a_many_b (ms_many_b_bid); +alter table ms_many_a_many_b add constraint fk_ms_many_a_many_b_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid) on delete restrict on update restrict; -alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_co_2 foreign key (o_country_code) references o_country (code) on delete restrict on update restrict; -create index ix_o_cached_bean_country_o_co_2 on o_cached_bean_country (o_country_code); +create index ix_ms_many_b_many_a_ms_many_b on ms_many_b_many_a (ms_many_b_bid); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_b foreign key (ms_many_b_bid) references ms_many_b (bid) on delete restrict on update restrict; -alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cached_1 foreign key (cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; -create index ix_o_cached_bean_child_cached_1 on o_cached_bean_child (cached_bean_id); +create index ix_ms_many_b_many_a_ms_many_a on ms_many_b_many_a (ms_many_a_aid); +alter table ms_many_b_many_a add constraint fk_ms_many_b_many_a_ms_many_a foreign key (ms_many_a_aid) references ms_many_a (aid) on delete restrict on update restrict; + +create index ix_my_lob_size_join_many_parent_id on my_lob_size_join_many (parent_id); +alter table my_lob_size_join_many add constraint fk_my_lob_size_join_many_parent_id foreign key (parent_id) references my_lob_size (id) on delete restrict on update restrict; + +create index ix_o_cached_bean_country_o_cached_bean on o_cached_bean_country (o_cached_bean_id); +alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_cached_bean foreign key (o_cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; + +create index ix_o_cached_bean_country_o_country on o_cached_bean_country (o_country_code); +alter table o_cached_bean_country add constraint fk_o_cached_bean_country_o_country foreign key (o_country_code) references o_country (code) on delete restrict on update restrict; + +create index ix_o_cached_bean_child_cached_bean_id on o_cached_bean_child (cached_bean_id); +alter table o_cached_bean_child add constraint fk_o_cached_bean_child_cached_bean_id foreign key (cached_bean_id) references o_cached_bean (id) on delete restrict on update restrict; alter table oengine add constraint fk_oengine_car_id foreign key (car_id) references ocar (id) on delete restrict on update restrict; alter table ogear_box add constraint fk_ogear_box_car_id foreign key (car_id) references ocar (id) on delete restrict on update restrict; -alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id) on delete restrict on update restrict; +alter table oroad_show_msg add constraint fk_oroad_show_msg_company_id foreign key (company_id) references ocompany (id) on delete restrict on update restrict; + +create index ix_om_ordered_detail_master_id on om_ordered_detail (master_id); +alter table om_ordered_detail add constraint fk_om_ordered_detail_master_id foreign key (master_id) references om_ordered_master (id) on delete restrict on update restrict; + create index ix_o_order_kcustomer_id on o_order (kcustomer_id); +alter table o_order add constraint fk_o_order_kcustomer_id foreign key (kcustomer_id) references o_customer (id) on delete restrict on update restrict; -alter table o_order_detail add constraint fk_o_order_detail_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; create index ix_o_order_detail_order_id on o_order_detail (order_id); +alter table o_order_detail add constraint fk_o_order_detail_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; -alter table o_order_detail add constraint fk_o_order_detail_product_id foreign key (product_id) references o_product (id) on delete restrict on update restrict; create index ix_o_order_detail_product_id on o_order_detail (product_id); +alter table o_order_detail add constraint fk_o_order_detail_product_id foreign key (product_id) references o_product (id) on delete restrict on update restrict; -alter table s_order_items add constraint fk_s_order_items_order_uuid foreign key (order_uuid) references s_orders (uuid) on delete restrict on update restrict; create index ix_s_order_items_order_uuid on s_order_items (order_uuid); +alter table s_order_items add constraint fk_s_order_items_order_uuid foreign key (order_uuid) references s_orders (uuid) on delete restrict on update restrict; -alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; create index ix_or_order_ship_order_id on or_order_ship (order_id); +alter table or_order_ship add constraint fk_or_order_ship_order_id foreign key (order_id) references o_order (id) on delete restrict on update restrict; + +alter table oto_bchild add constraint fk_oto_bchild_master_id foreign key (master_id) references oto_bmaster (id) on delete restrict on update restrict; alter table oto_child add constraint fk_oto_child_master_id foreign key (master_id) references oto_master (id) on delete restrict on update restrict; +alter table oto_cust_address add constraint fk_oto_cust_address_customer_cid foreign key (customer_cid) references oto_cust (cid) on delete restrict on update restrict; + +alter table oto_prime_extra add constraint fk_oto_prime_extra_eid foreign key (eid) references oto_prime (pid) on delete restrict on update restrict; + +create index ix_oto_th_many_oto_th_top_id on oto_th_many (oto_th_top_id); +alter table oto_th_many add constraint fk_oto_th_many_oto_th_top_id foreign key (oto_th_top_id) references oto_th_top (id) on delete restrict on update restrict; + +alter table oto_th_one add constraint fk_oto_th_one_many_id foreign key (many_id) references oto_th_many (id) on delete restrict on update restrict; + +alter table oto_ubprime_extra add constraint fk_oto_ubprime_extra_eid foreign key (eid) references oto_ubprime (pid) on delete restrict on update restrict; + +alter table oto_uprime_extra add constraint fk_oto_uprime_extra_eid foreign key (eid) references oto_uprime (pid) on delete restrict on update restrict; + alter table pfile add constraint fk_pfile_file_content_id foreign key (file_content_id) references pfile_content (id) on delete restrict on update restrict; alter table pfile add constraint fk_pfile_file_content2_id foreign key (file_content2_id) references pfile_content (id) on delete restrict on update restrict; alter table paggview add constraint fk_paggview_pview_id foreign key (pview_id) references pp (id) on delete restrict on update restrict; -alter table pallet_location add constraint fk_pallet_location_zone_sid foreign key (zone_sid) references zones (id) on delete restrict on update restrict; create index ix_pallet_location_zone_sid on pallet_location (zone_sid); +alter table pallet_location add constraint fk_pallet_location_zone_sid foreign key (zone_sid) references zones (id) on delete restrict on update restrict; alter table parcel_location add constraint fk_parcel_location_parcelid foreign key (parcelid) references parcel (parcelid) on delete restrict on update restrict; -alter table rawinherit_parent_rawinherit_dat add constraint fk_rawinherit_parent_rawinher_1 foreign key (rawinherit_parent_id) references rawinherit_parent (id) on delete restrict on update restrict; -create index ix_rawinherit_parent_rawinher_1 on rawinherit_parent_rawinherit_dat (rawinherit_parent_id); +create index ix_rawinherit_parent_rawinherit_data_rawinherit_parent on rawinherit_parent_rawinherit_data (rawinherit_parent_id); +alter table rawinherit_parent_rawinherit_data add constraint fk_rawinherit_parent_rawinherit_data_rawinherit_parent foreign key (rawinherit_parent_id) references rawinherit_parent (id) on delete restrict on update restrict; -alter table rawinherit_parent_rawinherit_dat add constraint fk_rawinherit_parent_rawinher_2 foreign key (rawinherit_data_id) references rawinherit_data (id) on delete restrict on update restrict; -create index ix_rawinherit_parent_rawinher_2 on rawinherit_parent_rawinherit_dat (rawinherit_data_id); +create index ix_rawinherit_parent_rawinherit_data_rawinherit_data on rawinherit_parent_rawinherit_data (rawinherit_data_id); +alter table rawinherit_parent_rawinherit_data add constraint fk_rawinherit_parent_rawinherit_data_rawinherit_data foreign key (rawinherit_data_id) references rawinherit_data (id) on delete restrict on update restrict; -alter table c_participation add constraint fk_c_participation_conversati_1 foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -create index ix_c_participation_conversati_1 on c_participation (conversation_id); +create index ix_parent_person_some_bean_id on parent_person (some_bean_id); +alter table parent_person add constraint fk_parent_person_some_bean_id foreign key (some_bean_id) references e_basic (id) on delete restrict on update restrict; + +create index ix_parent_person_parent_identifier on parent_person (parent_identifier); +alter table parent_person add constraint fk_parent_person_parent_identifier foreign key (parent_identifier) references grand_parent_person (identifier) on delete restrict on update restrict; + +create index ix_c_participation_conversation_id on c_participation (conversation_id); +alter table c_participation add constraint fk_c_participation_conversation_id foreign key (conversation_id) references c_conversation (id) on delete restrict on update restrict; -alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; create index ix_c_participation_user_id on c_participation (user_id); +alter table c_participation add constraint fk_c_participation_user_id foreign key (user_id) references c_user (id) on delete restrict on update restrict; -alter table persistent_file_content add constraint fk_persistent_file_content_pe_1 foreign key (persistent_file_id) references persistent_file (id) on delete restrict on update restrict; +alter table persistent_file_content add constraint fk_persistent_file_content_persistent_file_id foreign key (persistent_file_id) references persistent_file (id) on delete restrict on update restrict; -alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid) on delete restrict on update restrict; create index ix_person_default_address_oid on person (default_address_oid); +alter table person add constraint fk_person_default_address_oid foreign key (default_address_oid) references address (oid) on delete restrict on update restrict; -alter table phones add constraint fk_phones_person_id foreign key (person_id) references persons (id) on delete restrict on update restrict; create index ix_phones_person_id on phones (person_id); +alter table phones add constraint fk_phones_person_id foreign key (person_id) references persons (id) on delete restrict on update restrict; +create index ix_pp_to_ww_pp on pp_to_ww (pp_id); alter table pp_to_ww add constraint fk_pp_to_ww_pp foreign key (pp_id) references pp (id) on delete restrict on update restrict; -create index ix_pp_to_ww_pp_id on pp_to_ww (pp_id); +create index ix_pp_to_ww_wview on pp_to_ww (ww_id); alter table pp_to_ww add constraint fk_pp_to_ww_wview foreign key (ww_id) references wview (id) on delete restrict on update restrict; -create index ix_pp_to_ww_ww_id on pp_to_ww (ww_id); -alter table r_orders add constraint fk_r_orders_rcustomer foreign key (company,customername) references rcustomer (company,name) on delete restrict on update restrict; -create index ix_r_orders_company_customern_1 on r_orders (company,customername); +create index ix_question_groupobjectid on question (groupobjectid); +alter table question add constraint fk_question_groupobjectid foreign key (groupobjectid) references survey_group (id) on delete restrict on update restrict; -alter table resourcefile add constraint fk_resourcefile_parentresourc_1 foreign key (parentresourcefileid) references resourcefile (id) on delete restrict on update restrict; -create index ix_resourcefile_parentresourc_1 on resourcefile (parentresourcefileid); +create index ix_r_orders_customer on r_orders (company,customername); +alter table r_orders add constraint fk_r_orders_customer foreign key (company,customername) references rcustomer (company,name) on delete restrict on update restrict; + +create index ix_resourcefile_parentresourcefileid on resourcefile (parentresourcefileid); +alter table resourcefile add constraint fk_resourcefile_parentresourcefileid foreign key (parentresourcefileid) references resourcefile (id) on delete restrict on update restrict; -alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id) on delete restrict on update restrict; create index ix_mt_role_tenant_id on mt_role (tenant_id); +alter table mt_role add constraint fk_mt_role_tenant_id foreign key (tenant_id) references mt_tenant (id) on delete restrict on update restrict; +create index ix_mt_role_permission_mt_role on mt_role_permission (mt_role_id); alter table mt_role_permission add constraint fk_mt_role_permission_mt_role foreign key (mt_role_id) references mt_role (id) on delete restrict on update restrict; -create index ix_mt_role_permission_mt_role_1 on mt_role_permission (mt_role_id); -alter table mt_role_permission add constraint fk_mt_role_permission_mt_perm_2 foreign key (mt_permission_id) references mt_permission (id) on delete restrict on update restrict; -create index ix_mt_role_permission_mt_perm_2 on mt_role_permission (mt_permission_id); +create index ix_mt_role_permission_mt_permission on mt_role_permission (mt_permission_id); +alter table mt_role_permission add constraint fk_mt_role_permission_mt_permission foreign key (mt_permission_id) references mt_permission (id) on delete restrict on update restrict; alter table f_second add constraint fk_f_second_first foreign key (first) references f_first (id) on delete restrict on update restrict; -alter table section add constraint fk_section_article_id foreign key (article_id) references article (id) on delete restrict on update restrict; create index ix_section_article_id on section (article_id); +alter table section add constraint fk_section_article_id foreign key (article_id) references article (id) on delete restrict on update restrict; -alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id) on delete restrict on update restrict; create index ix_self_parent_parent_id on self_parent (parent_id); +alter table self_parent add constraint fk_self_parent_parent_id foreign key (parent_id) references self_parent (id) on delete restrict on update restrict; -alter table self_ref_customer add constraint fk_self_ref_customer_referred_1 foreign key (referred_by_id) references self_ref_customer (id) on delete restrict on update restrict; -create index ix_self_ref_customer_referred_1 on self_ref_customer (referred_by_id); +create index ix_self_ref_customer_referred_by_id on self_ref_customer (referred_by_id); +alter table self_ref_customer add constraint fk_self_ref_customer_referred_by_id foreign key (referred_by_id) references self_ref_customer (id) on delete restrict on update restrict; -alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id) on delete restrict on update restrict; create index ix_self_ref_example_parent_id on self_ref_example (parent_id); +alter table self_ref_example add constraint fk_self_ref_example_parent_id foreign key (parent_id) references self_ref_example (id) on delete restrict on update restrict; -alter table stockforecast add constraint fk_stockforecast_inner_report_1 foreign key (inner_report_id) references inner_report (id) on delete restrict on update restrict; -create index ix_stockforecast_inner_report_1 on stockforecast (inner_report_id); +create index ix_stockforecast_inner_report_id on stockforecast (inner_report_id); +alter table stockforecast add constraint fk_stockforecast_inner_report_id foreign key (inner_report_id) references inner_report (id) on delete restrict on update restrict; -alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id) on delete restrict on update restrict; create index ix_sub_section_section_id on sub_section (section_id); +alter table sub_section add constraint fk_sub_section_section_id foreign key (section_id) references section (id) on delete restrict on update restrict; -alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_namexx_1 foreign key (master_id) references t_atable_thatisrelatively (id) on delete restrict on update restrict; -create index ix_t_detail_with_other_namexx_1 on t_detail_with_other_namexxxyy (master_id); +create index ix_tevent_many_event_id on tevent_many (event_id); +alter table tevent_many add constraint fk_tevent_many_event_id foreign key (event_id) references tevent_one (id) on delete restrict on update restrict; + +alter table tevent_one add constraint fk_tevent_one_event_id foreign key (event_id) references tevent (id) on delete restrict on update restrict; + +create index ix_t_detail_with_other_namexxxyy_master_id on t_detail_with_other_namexxxyy (master_id); +alter table t_detail_with_other_namexxxyy add constraint fk_t_detail_with_other_namexxxyy_master_id foreign key (master_id) references t_atable_thatisrelatively (id) on delete restrict on update restrict; -alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id) on delete restrict on update restrict; create index ix_ts_detail_two_master_id on ts_detail_two (master_id); +alter table ts_detail_two add constraint fk_ts_detail_two_master_id foreign key (master_id) references ts_master_two (id) on delete restrict on update restrict; -alter table twheel add constraint fk_twheel_owner_plate_no foreign key (owner_plate_no) references tcar (plate_no) on delete restrict on update restrict; create index ix_twheel_owner_plate_no on twheel (owner_plate_no); +alter table twheel add constraint fk_twheel_owner_plate_no foreign key (owner_plate_no) references tcar (plate_no) on delete restrict on update restrict; alter table tire add constraint fk_tire_wheel foreign key (wheel) references wheel (id) on delete restrict on update restrict; -alter table trip add constraint fk_trip_vehicle_driver_id foreign key (vehicle_driver_id) references vehicle_driver (id) on delete restrict on update restrict; create index ix_trip_vehicle_driver_id on trip (vehicle_driver_id); +alter table trip add constraint fk_trip_vehicle_driver_id foreign key (vehicle_driver_id) references vehicle_driver (id) on delete restrict on update restrict; -alter table trip add constraint fk_trip_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; create index ix_trip_address_id on trip (address_id); +alter table trip add constraint fk_trip_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; -alter table type add constraint fk_type_sub_type_id foreign key (sub_type_id) references sub_type (sub_type_id) on delete restrict on update restrict; create index ix_type_sub_type_id on type (sub_type_id); +alter table type add constraint fk_type_sub_type_id foreign key (sub_type_id) references sub_type (sub_type_id) on delete restrict on update restrict; -alter table ut_detail add constraint fk_ut_detail_utmaster_id foreign key (utmaster_id) references ut_master (id) on delete restrict on update restrict; create index ix_ut_detail_utmaster_id on ut_detail (utmaster_id); +alter table ut_detail add constraint fk_ut_detail_utmaster_id foreign key (utmaster_id) references ut_master (id) on delete restrict on update restrict; -alter table uutwo add constraint fk_uutwo_master_id foreign key (master_id) references uuone (id) on delete restrict on update restrict; create index ix_uutwo_master_id on uutwo (master_id); +alter table uutwo add constraint fk_uutwo_master_id foreign key (master_id) references uuone (id) on delete restrict on update restrict; -alter table c_user add constraint fk_c_user_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; create index ix_c_user_group_id on c_user (group_id); +alter table c_user add constraint fk_c_user_group_id foreign key (group_id) references c_group (id) on delete restrict on update restrict; alter table oto_user add constraint fk_oto_user_account_id foreign key (account_id) references oto_account (id) on delete restrict on update restrict; -alter table em_user_role add constraint fk_em_user_role_user_id foreign key (user_id) references em_user (id) on delete restrict on update restrict; create index ix_em_user_role_user_id on em_user_role (user_id); +alter table em_user_role add constraint fk_em_user_role_user_id foreign key (user_id) references em_user (id) on delete restrict on update restrict; -alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id) on delete restrict on update restrict; create index ix_em_user_role_role_id on em_user_role (role_id); +alter table em_user_role add constraint fk_em_user_role_role_id foreign key (role_id) references em_role (id) on delete restrict on update restrict; -alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id) on delete restrict on update restrict; -create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); - -alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id) on delete restrict on update restrict; create index ix_vehicle_car_ref_id on vehicle (car_ref_id); +alter table vehicle add constraint fk_vehicle_car_ref_id foreign key (car_ref_id) references truck_ref (id) on delete restrict on update restrict; + +create index ix_vehicle_truck_ref_id on vehicle (truck_ref_id); +alter table vehicle add constraint fk_vehicle_truck_ref_id foreign key (truck_ref_id) references truck_ref (id) on delete restrict on update restrict; -alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id) on delete restrict on update restrict; create index ix_vehicle_driver_vehicle_id on vehicle_driver (vehicle_id); +alter table vehicle_driver add constraint fk_vehicle_driver_vehicle_id foreign key (vehicle_id) references vehicle (id) on delete restrict on update restrict; -alter table vehicle_driver add constraint fk_vehicle_driver_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; create index ix_vehicle_driver_address_id on vehicle_driver (address_id); +alter table vehicle_driver add constraint fk_vehicle_driver_address_id foreign key (address_id) references o_address (id) on delete restrict on update restrict; -alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id) on delete restrict on update restrict; create index ix_warehouses_officezoneid on warehouses (officezoneid); +alter table warehouses add constraint fk_warehouses_officezoneid foreign key (officezoneid) references zones (id) on delete restrict on update restrict; -alter table warehousesshippingzones add constraint fk_warehousesshippingzones_wa_1 foreign key (warehouseid) references warehouses (id) on delete restrict on update restrict; -create index ix_warehousesshippingzones_wa_1 on warehousesshippingzones (warehouseid); +create index ix_warehousesshippingzones_warehouses on warehousesshippingzones (warehouseid); +alter table warehousesshippingzones add constraint fk_warehousesshippingzones_warehouses foreign key (warehouseid) references warehouses (id) on delete restrict on update restrict; -alter table warehousesshippingzones add constraint fk_warehousesshippingzones_zo_2 foreign key (shippingzoneid) references zones (id) on delete restrict on update restrict; -create index ix_warehousesshippingzones_sh_2 on warehousesshippingzones (shippingzoneid); +create index ix_warehousesshippingzones_zones on warehousesshippingzones (shippingzoneid); +alter table warehousesshippingzones add constraint fk_warehousesshippingzones_zones foreign key (shippingzoneid) references zones (id) on delete restrict on update restrict; -alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id) on delete restrict on update restrict; create index ix_sa_wheel_tire on sa_wheel (tire); +alter table sa_wheel add constraint fk_sa_wheel_tire foreign key (tire) references sa_tire (id) on delete restrict on update restrict; -alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id) on delete restrict on update restrict; create index ix_sa_wheel_car on sa_wheel (car); +alter table sa_wheel add constraint fk_sa_wheel_car foreign key (car) references sa_car (id) on delete restrict on update restrict; + +create index ix_g_who_props_otm_who_created_id on g_who_props_otm (who_created_id); +alter table g_who_props_otm add constraint fk_g_who_props_otm_who_created_id foreign key (who_created_id) references g_user (id) on delete restrict on update restrict; + +create index ix_g_who_props_otm_who_modified_id on g_who_props_otm (who_modified_id); +alter table g_who_props_otm add constraint fk_g_who_props_otm_who_modified_id foreign key (who_modified_id) references g_user (id) on delete restrict on update restrict; -alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id) on delete restrict on update restrict; create index ix_with_zero_parent_id on with_zero (parent_id); +alter table with_zero add constraint fk_with_zero_parent_id foreign key (parent_id) references parent (id) on delete restrict on update restrict; + +alter table hx_link add column sys_period tstzrange not null default tstzrange(current_timestamp, null); +update hx_link set sys_period = tstzrange(when_created, null); +create table hx_link_history(like hx_link); +create view hx_link_with_history as select * from hx_link union all select * from hx_link_history; + +create or replace function hx_link_history_version() returns trigger as $$ +begin + if (TG_OP = 'UPDATE') then + insert into hx_link_history (sys_period,id, name, location, comments, version, when_created, when_modified) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + NEW.sys_period = tstzrange(current_timestamp,null); + return new; + elsif (TG_OP = 'DELETE') then + insert into hx_link_history (sys_period,id, name, location, comments, version, when_created, when_modified) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + return old; + end if; +end; +$$ LANGUAGE plpgsql; + +create trigger hx_link_history_upd + before update or delete on hx_link + for each row execute procedure hx_link_history_version(); + +alter table hi_link add column sys_period tstzrange not null default tstzrange(current_timestamp, null); +update hi_link set sys_period = tstzrange(when_created, null); +create table hi_link_history(like hi_link); +create view hi_link_with_history as select * from hi_link union all select * from hi_link_history; + +create or replace function hi_link_history_version() returns trigger as $$ +begin + if (TG_OP = 'UPDATE') then + insert into hi_link_history (sys_period,id, name, location, comments, version, when_created, when_modified) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + NEW.sys_period = tstzrange(current_timestamp,null); + return new; + elsif (TG_OP = 'DELETE') then + insert into hi_link_history (sys_period,id, name, location, comments, version, when_created, when_modified) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.name, OLD.location, OLD.comments, OLD.version, OLD.when_created, OLD.when_modified); + return old; + end if; +end; +$$ LANGUAGE plpgsql; + +create trigger hi_link_history_upd + before update or delete on hi_link + for each row execute procedure hi_link_history_version(); + +alter table hi_link_doc add column sys_period tstzrange not null default tstzrange(current_timestamp, null); +create table hi_link_doc_history(like hi_link_doc); +create view hi_link_doc_with_history as select * from hi_link_doc union all select * from hi_link_doc_history; + +create or replace function hi_link_doc_history_version() returns trigger as $$ +begin + if (TG_OP = 'UPDATE') then + insert into hi_link_doc_history (sys_period,hi_link_id, hi_doc_id) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.hi_link_id, OLD.hi_doc_id); + NEW.sys_period = tstzrange(current_timestamp,null); + return new; + elsif (TG_OP = 'DELETE') then + insert into hi_link_doc_history (sys_period,hi_link_id, hi_doc_id) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.hi_link_id, OLD.hi_doc_id); + return old; + end if; +end; +$$ LANGUAGE plpgsql; + +create trigger hi_link_doc_history_upd + before update or delete on hi_link_doc + for each row execute procedure hi_link_doc_history_version(); + +alter table link add column sys_period tstzrange not null default tstzrange(current_timestamp, null); +update link set sys_period = tstzrange(when_created, null); +create table link_history(like link); +create view link_with_history as select * from link union all select * from link_history; + +create or replace function link_history_version() returns trigger as $$ +begin + if (TG_OP = 'UPDATE') then + insert into link_history (sys_period,id, name, location, when_publish, link_comment, version, when_created, when_modified, deleted) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.name, OLD.location, OLD.when_publish, OLD.link_comment, OLD.version, OLD.when_created, OLD.when_modified, OLD.deleted); + NEW.sys_period = tstzrange(current_timestamp,null); + return new; + elsif (TG_OP = 'DELETE') then + insert into link_history (sys_period,id, name, location, when_publish, link_comment, version, when_created, when_modified, deleted) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.name, OLD.location, OLD.when_publish, OLD.link_comment, OLD.version, OLD.when_created, OLD.when_modified, OLD.deleted); + return old; + end if; +end; +$$ LANGUAGE plpgsql; + +create trigger link_history_upd + before update or delete on link + for each row execute procedure link_history_version(); + +alter table c_user add column sys_period tstzrange not null default tstzrange(current_timestamp, null); +update c_user set sys_period = tstzrange(when_created, null); +create table c_user_history(like c_user); +create view c_user_with_history as select * from c_user union all select * from c_user_history; + +create or replace function c_user_history_version() returns trigger as $$ +begin + if (TG_OP = 'UPDATE') then + insert into c_user_history (sys_period,id, inactive, name, email, group_id, version, when_created, when_modified) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.inactive, OLD.name, OLD.email, OLD.group_id, OLD.version, OLD.when_created, OLD.when_modified); + NEW.sys_period = tstzrange(current_timestamp,null); + return new; + elsif (TG_OP = 'DELETE') then + insert into c_user_history (sys_period,id, inactive, name, email, group_id, version, when_created, when_modified) values (tstzrange(lower(OLD.sys_period), current_timestamp), OLD.id, OLD.inactive, OLD.name, OLD.email, OLD.group_id, OLD.version, OLD.when_created, OLD.when_modified); + return old; + end if; +end; +$$ LANGUAGE plpgsql; + +create trigger c_user_history_upd + before update or delete on c_user + for each row execute procedure c_user_history_version(); diff --git a/src/test/ddl-review/pg-drop-all.sql b/src/test/ddl-review/pg-drop-all.sql index cf7ea95f8..e02947028 100644 --- a/src/test/ddl-review/pg-drop-all.sql +++ b/src/test/ddl-review/pg-drop-all.sql @@ -1,340 +1,573 @@ -alter table bar drop constraint fk_bar_foo_id; -drop index ix_bar_foo_id; +-- Generated by ebean unknown at 2018-03-08T06:39:45.063Z +alter table if exists bar drop constraint if exists fk_bar_foo_id; +drop index if exists ix_bar_foo_id; -alter table o_address drop constraint fk_o_address_country_code; -drop index ix_o_address_country_code; +alter table if exists addr drop constraint if exists fk_addr_employee_id; +drop index if exists ix_addr_employee_id; -alter table animals drop constraint fk_animals_shelter_id; -drop index ix_animals_shelter_id; +alter table if exists o_address drop constraint if exists fk_o_address_country_code; +drop index if exists ix_o_address_country_code; -alter table attribute drop constraint fk_attribute_attribute_holder_1; -drop index ix_attribute_attribute_holder_1; +alter table if exists album drop constraint if exists fk_album_cover_id; -alter table bbookmark drop constraint fk_bbookmark_user_id; -drop index ix_bbookmark_user_id; +alter table if exists animal drop constraint if exists fk_animal_shelter_id; +drop index if exists ix_animal_shelter_id; -alter table drel_booking drop constraint fk_drel_booking_agent_invoice; +alter table if exists attribute drop constraint if exists fk_attribute_attribute_holder_id; +drop index if exists ix_attribute_attribute_holder_id; -alter table drel_booking drop constraint fk_drel_booking_client_invoice; +alter table if exists bbookmark drop constraint if exists fk_bbookmark_user_id; +drop index if exists ix_bbookmark_user_id; -alter table ckey_detail drop constraint fk_ckey_detail_ckey_parent; -drop index ix_ckey_detail_one_key_two_key; +alter table if exists bsite_user drop constraint if exists fk_bsite_user_site_id; +drop index if exists ix_bsite_user_site_id; -alter table ckey_parent drop constraint fk_ckey_parent_assoc_id; -drop index ix_ckey_parent_assoc_id; +alter table if exists bsite_user drop constraint if exists fk_bsite_user_user_id; +drop index if exists ix_bsite_user_user_id; -alter table calculation_result drop constraint fk_calculation_result_product_1; -drop index ix_calculation_result_product_1; +alter table if exists bsite_user_b drop constraint if exists fk_bsite_user_b_site; +drop index if exists ix_bsite_user_b_site; -alter table calculation_result drop constraint fk_calculation_result_group_c_2; -drop index ix_calculation_result_group_c_2; +alter table if exists bsite_user_b drop constraint if exists fk_bsite_user_b_usr; +drop index if exists ix_bsite_user_b_usr; -alter table sp_car_car_wheels drop constraint fk_sp_car_car_wheels_sp_car_car; -drop index ix_sp_car_car_wheels_car; +alter table if exists bsite_user_c drop constraint if exists fk_bsite_user_c_site_uid; +drop index if exists ix_bsite_user_c_site_uid; -alter table sp_car_car_wheels drop constraint fk_sp_car_car_wheels_sp_car_w_2; -drop index ix_sp_car_car_wheels_wheel; +alter table if exists bsite_user_c drop constraint if exists fk_bsite_user_c_user_uid; +drop index if exists ix_bsite_user_c_user_uid; -alter table car_accessory drop constraint fk_car_accessory_car_id; -drop index ix_car_accessory_car_id; +alter table if exists drel_booking drop constraint if exists fk_drel_booking_agent_invoice; -alter table configuration drop constraint fk_configuration_configuratio_1; -drop index ix_configuration_configuratio_1; +alter table if exists drel_booking drop constraint if exists fk_drel_booking_client_invoice; -alter table contact drop constraint fk_contact_customer_id; -drop index ix_contact_customer_id; +alter table if exists ckey_detail drop constraint if exists fk_ckey_detail_parent; +drop index if exists ix_ckey_detail_parent; -alter table contact drop constraint fk_contact_group_id; -drop index ix_contact_group_id; +alter table if exists ckey_parent drop constraint if exists fk_ckey_parent_assoc_id; +drop index if exists ix_ckey_parent_assoc_id; -alter table contact_note drop constraint fk_contact_note_contact_id; -drop index ix_contact_note_contact_id; +alter table if exists calculation_result drop constraint if exists fk_calculation_result_product_configuration_id; +drop index if exists ix_calculation_result_product_configuration_id; -alter table c_conversation drop constraint fk_c_conversation_group_id; -drop index ix_c_conversation_group_id; +alter table if exists calculation_result drop constraint if exists fk_calculation_result_group_configuration_id; +drop index if exists ix_calculation_result_group_configuration_id; -alter table o_customer drop constraint fk_o_customer_billing_address_1; -drop index ix_o_customer_billing_address_1; +alter table if exists sp_car_car_wheels drop constraint if exists fk_sp_car_car_wheels_sp_car_car; +drop index if exists ix_sp_car_car_wheels_sp_car_car; -alter table o_customer drop constraint fk_o_customer_shipping_addres_2; -drop index ix_o_customer_shipping_addres_2; +alter table if exists sp_car_car_wheels drop constraint if exists fk_sp_car_car_wheels_sp_car_wheel; +drop index if exists ix_sp_car_car_wheels_sp_car_wheel; -alter table eemb_inner drop constraint fk_eemb_inner_outer_id; -drop index ix_eemb_inner_outer_id; +alter table if exists car_accessory drop constraint if exists fk_car_accessory_fuse_id; +drop index if exists ix_car_accessory_fuse_id; -alter table einvoice drop constraint fk_einvoice_person_id; -drop index ix_einvoice_person_id; +alter table if exists car_accessory drop constraint if exists fk_car_accessory_car_id; +drop index if exists ix_car_accessory_car_id; -alter table enull_collection_detail drop constraint fk_enull_collection_detail_en_1; -drop index ix_enull_collection_detail_en_1; +alter table if exists category drop constraint if exists fk_category_surveyobjectid; +drop index if exists ix_category_surveyobjectid; -alter table eopt_one_a drop constraint fk_eopt_one_a_b_id; -drop index ix_eopt_one_a_b_id; +alter table if exists child_person drop constraint if exists fk_child_person_some_bean_id; +drop index if exists ix_child_person_some_bean_id; -alter table eopt_one_b drop constraint fk_eopt_one_b_c_id; -drop index ix_eopt_one_b_c_id; +alter table if exists child_person drop constraint if exists fk_child_person_parent_identifier; +drop index if exists ix_child_person_parent_identifier; -alter table evanilla_collection_detail drop constraint fk_evanilla_collection_detail_1; -drop index ix_evanilla_collection_detail_1; +alter table if exists configuration drop constraint if exists fk_configuration_configurations_id; +drop index if exists ix_configuration_configurations_id; -alter table td_child drop constraint fk_td_child_parent_id; -drop index ix_td_child_parent_id; +alter table if exists contact drop constraint if exists fk_contact_customer_id; +drop index if exists ix_contact_customer_id; -alter table imrelated drop constraint fk_imrelated_owner_id; -drop index ix_imrelated_owner_id; +alter table if exists contact drop constraint if exists fk_contact_group_id; +drop index if exists ix_contact_group_id; -alter table info_contact drop constraint fk_info_contact_company_id; -drop index ix_info_contact_company_id; +alter table if exists contact_note drop constraint if exists fk_contact_note_contact_id; +drop index if exists ix_contact_note_contact_id; -alter table info_customer drop constraint fk_info_customer_company_id; +alter table if exists c_conversation drop constraint if exists fk_c_conversation_group_id; +drop index if exists ix_c_conversation_group_id; -alter table inner_report drop constraint fk_inner_report_forecast_id; +alter table if exists o_customer drop constraint if exists fk_o_customer_billing_address_id; +drop index if exists ix_o_customer_billing_address_id; -alter table drel_invoice drop constraint fk_drel_invoice_booking; -drop index ix_drel_invoice_booking; +alter table if exists o_customer drop constraint if exists fk_o_customer_shipping_address_id; +drop index if exists ix_o_customer_shipping_address_id; -alter table item drop constraint fk_item_type; -drop index ix_item_customer_type; +alter table if exists dcredit_drol drop constraint if exists fk_dcredit_drol_dcredit; +drop index if exists ix_dcredit_drol_dcredit; -alter table item drop constraint fk_item_region; -drop index ix_item_customer_region; +alter table if exists dcredit_drol drop constraint if exists fk_dcredit_drol_drol; +drop index if exists ix_dcredit_drol_drol; -alter table level1_level4 drop constraint fk_level1_level4_level1; -drop index ix_level1_level4_level1_id; +alter table if exists drot_drol drop constraint if exists fk_drot_drol_drot; +drop index if exists ix_drot_drol_drot; -alter table level1_level4 drop constraint fk_level1_level4_level4; -drop index ix_level1_level4_level4_id; +alter table if exists drot_drol drop constraint if exists fk_drot_drol_drol; +drop index if exists ix_drot_drol_drol; -alter table level1_level2 drop constraint fk_level1_level2_level1; -drop index ix_level1_level2_level1_id; +alter table if exists dfk_cascade drop constraint if exists fk_dfk_cascade_one_id; +drop index if exists ix_dfk_cascade_one_id; -alter table level1_level2 drop constraint fk_level1_level2_level2; -drop index ix_level1_level2_level2_id; +alter table if exists dfk_set_null drop constraint if exists fk_dfk_set_null_one_id; +drop index if exists ix_dfk_set_null_one_id; -alter table level2_level3 drop constraint fk_level2_level3_level2; -drop index ix_level2_level3_level2_id; +alter table if exists doc drop constraint if exists fk_doc_id; -alter table level2_level3 drop constraint fk_level2_level3_level3; -drop index ix_level2_level3_level3_id; +alter table if exists doc_link drop constraint if exists fk_doc_link_doc; +drop index if exists ix_doc_link_doc; -alter table la_attr_value_attribute drop constraint fk_la_attr_value_attribute_la_1; -drop index ix_la_attr_value_attribute_la_1; +alter table if exists doc_link drop constraint if exists fk_doc_link_link; +drop index if exists ix_doc_link_link; -alter table la_attr_value_attribute drop constraint fk_la_attr_value_attribute_at_2; -drop index ix_la_attr_value_attribute_at_2; +alter table if exists document drop constraint if exists fk_document_id; -alter table mprinter drop constraint fk_mprinter_current_state_id; -drop index ix_mprinter_current_state_id; +alter table if exists document drop constraint if exists fk_document_organisation_id; +drop index if exists ix_document_organisation_id; -alter table mprinter drop constraint fk_mprinter_last_swap_cyan_id; +alter table if exists document_draft drop constraint if exists fk_document_draft_organisation_id; +drop index if exists ix_document_draft_organisation_id; -alter table mprinter drop constraint fk_mprinter_last_swap_magenta_3; +alter table if exists document_media drop constraint if exists fk_document_media_document_id; +drop index if exists ix_document_media_document_id; -alter table mprinter drop constraint fk_mprinter_last_swap_yellow_id; +alter table if exists document_media_draft drop constraint if exists fk_document_media_draft_document_id; +drop index if exists ix_document_media_draft_document_id; -alter table mprinter drop constraint fk_mprinter_last_swap_black_id; +alter table if exists ebasic_json_map_detail drop constraint if exists fk_ebasic_json_map_detail_owner_id; +drop index if exists ix_ebasic_json_map_detail_owner_id; -alter table mprinter_state drop constraint fk_mprinter_state_printer_id; -drop index ix_mprinter_state_printer_id; +alter table if exists ebasic_no_sdchild drop constraint if exists fk_ebasic_no_sdchild_owner_id; +drop index if exists ix_ebasic_no_sdchild_owner_id; -alter table mprofile drop constraint fk_mprofile_picture_id; -drop index ix_mprofile_picture_id; +alter table if exists ebasic_sdchild drop constraint if exists fk_ebasic_sdchild_owner_id; +drop index if exists ix_ebasic_sdchild_owner_id; -alter table mrole_muser drop constraint fk_mrole_muser_mrole; -drop index ix_mrole_muser_mrole_roleid; +alter table if exists eemb_inner drop constraint if exists fk_eemb_inner_outer_id; +drop index if exists ix_eemb_inner_outer_id; -alter table mrole_muser drop constraint fk_mrole_muser_muser; -drop index ix_mrole_muser_muser_userid; +alter table if exists einvoice drop constraint if exists fk_einvoice_person_id; +drop index if exists ix_einvoice_person_id; -alter table muser drop constraint fk_muser_user_type_id; -drop index ix_muser_user_type_id; +alter table if exists enull_collection_detail drop constraint if exists fk_enull_collection_detail_enull_collection_id; +drop index if exists ix_enull_collection_detail_enull_collection_id; -alter table c_message drop constraint fk_c_message_conversation_id; -drop index ix_c_message_conversation_id; +alter table if exists eopt_one_a drop constraint if exists fk_eopt_one_a_b_id; +drop index if exists ix_eopt_one_a_b_id; -alter table c_message drop constraint fk_c_message_user_id; -drop index ix_c_message_user_id; +alter table if exists eopt_one_b drop constraint if exists fk_eopt_one_b_c_id; +drop index if exists ix_eopt_one_b_c_id; -alter table mnoc_user_mnoc_role drop constraint fk_mnoc_user_mnoc_role_mnoc_u_1; -drop index ix_mnoc_user_mnoc_role_mnoc_u_1; +alter table if exists esoft_del_book drop constraint if exists fk_esoft_del_book_lend_by_id; +drop index if exists ix_esoft_del_book_lend_by_id; -alter table mnoc_user_mnoc_role drop constraint fk_mnoc_user_mnoc_role_mnoc_r_2; -drop index ix_mnoc_user_mnoc_role_mnoc_r_2; +alter table if exists esoft_del_book_esoft_del_user drop constraint if exists fk_esoft_del_book_esoft_del_user_esoft_del_book; +drop index if exists ix_esoft_del_book_esoft_del_user_esoft_del_book; -alter table mp_role drop constraint fk_mp_role_mp_user_id; -drop index ix_mp_role_mp_user_id; +alter table if exists esoft_del_book_esoft_del_user drop constraint if exists fk_esoft_del_book_esoft_del_user_esoft_del_user; +drop index if exists ix_esoft_del_book_esoft_del_user_esoft_del_user; -alter table my_lob_size_join_many drop constraint fk_my_lob_size_join_many_pare_1; -drop index ix_my_lob_size_join_many_pare_1; +alter table if exists esoft_del_down drop constraint if exists fk_esoft_del_down_esoft_del_mid_id; +drop index if exists ix_esoft_del_down_esoft_del_mid_id; -alter table o_cached_bean_country drop constraint fk_o_cached_bean_country_o_ca_1; -drop index ix_o_cached_bean_country_o_ca_1; +alter table if exists esoft_del_mid drop constraint if exists fk_esoft_del_mid_top_id; +drop index if exists ix_esoft_del_mid_top_id; -alter table o_cached_bean_country drop constraint fk_o_cached_bean_country_o_co_2; -drop index ix_o_cached_bean_country_o_co_2; +alter table if exists esoft_del_mid drop constraint if exists fk_esoft_del_mid_up_id; +drop index if exists ix_esoft_del_mid_up_id; -alter table o_cached_bean_child drop constraint fk_o_cached_bean_child_cached_1; -drop index ix_o_cached_bean_child_cached_1; +alter table if exists esoft_del_one_a drop constraint if exists fk_esoft_del_one_a_oneb_id; -alter table oengine drop constraint fk_oengine_car_id; +alter table if exists esoft_del_role_esoft_del_user drop constraint if exists fk_esoft_del_role_esoft_del_user_esoft_del_role; +drop index if exists ix_esoft_del_role_esoft_del_user_esoft_del_role; -alter table ogear_box drop constraint fk_ogear_box_car_id; +alter table if exists esoft_del_role_esoft_del_user drop constraint if exists fk_esoft_del_role_esoft_del_user_esoft_del_user; +drop index if exists ix_esoft_del_role_esoft_del_user_esoft_del_user; -alter table o_order drop constraint fk_o_order_kcustomer_id; -drop index ix_o_order_kcustomer_id; +alter table if exists esoft_del_user_esoft_del_role drop constraint if exists fk_esoft_del_user_esoft_del_role_esoft_del_user; +drop index if exists ix_esoft_del_user_esoft_del_role_esoft_del_user; -alter table o_order_detail drop constraint fk_o_order_detail_order_id; -drop index ix_o_order_detail_order_id; +alter table if exists esoft_del_user_esoft_del_role drop constraint if exists fk_esoft_del_user_esoft_del_role_esoft_del_role; +drop index if exists ix_esoft_del_user_esoft_del_role_esoft_del_role; -alter table o_order_detail drop constraint fk_o_order_detail_product_id; -drop index ix_o_order_detail_product_id; +alter table if exists rawinherit_uncle drop constraint if exists fk_rawinherit_uncle_parent_id; +drop index if exists ix_rawinherit_uncle_parent_id; -alter table s_order_items drop constraint fk_s_order_items_order_uuid; -drop index ix_s_order_items_order_uuid; +alter table if exists evanilla_collection_detail drop constraint if exists fk_evanilla_collection_detail_evanilla_collection_id; +drop index if exists ix_evanilla_collection_detail_evanilla_collection_id; -alter table or_order_ship drop constraint fk_or_order_ship_order_id; -drop index ix_or_order_ship_order_id; +alter table if exists td_child drop constraint if exists fk_td_child_parent_id; +drop index if exists ix_td_child_parent_id; -alter table oto_child drop constraint fk_oto_child_master_id; +alter table if exists empl drop constraint if exists fk_empl_default_address_id; +drop index if exists ix_empl_default_address_id; -alter table pfile drop constraint fk_pfile_file_content_id; +alter table if exists grand_parent_person drop constraint if exists fk_grand_parent_person_some_bean_id; +drop index if exists ix_grand_parent_person_some_bean_id; -alter table pfile drop constraint fk_pfile_file_content2_id; +alter table if exists survey_group drop constraint if exists fk_survey_group_categoryobjectid; +drop index if exists ix_survey_group_categoryobjectid; -alter table paggview drop constraint fk_paggview_pview_id; +alter table if exists hx_link_doc drop constraint if exists fk_hx_link_doc_hx_link; +drop index if exists ix_hx_link_doc_hx_link; -alter table pallet_location drop constraint fk_pallet_location_zone_sid; -drop index ix_pallet_location_zone_sid; +alter table if exists hx_link_doc drop constraint if exists fk_hx_link_doc_he_doc; +drop index if exists ix_hx_link_doc_he_doc; -alter table parcel_location drop constraint fk_parcel_location_parcelid; +alter table if exists hi_link_doc drop constraint if exists fk_hi_link_doc_hi_link; +drop index if exists ix_hi_link_doc_hi_link; -alter table rawinherit_parent_rawinherit_dat drop constraint fk_rawinherit_parent_rawinher_1; -drop index ix_rawinherit_parent_rawinher_1; +alter table if exists hi_link_doc drop constraint if exists fk_hi_link_doc_hi_doc; +drop index if exists ix_hi_link_doc_hi_doc; -alter table rawinherit_parent_rawinherit_dat drop constraint fk_rawinherit_parent_rawinher_2; -drop index ix_rawinherit_parent_rawinher_2; +alter table if exists imrelated drop constraint if exists fk_imrelated_owner_id; +drop index if exists ix_imrelated_owner_id; -alter table c_participation drop constraint fk_c_participation_conversati_1; -drop index ix_c_participation_conversati_1; +alter table if exists info_contact drop constraint if exists fk_info_contact_company_id; +drop index if exists ix_info_contact_company_id; -alter table c_participation drop constraint fk_c_participation_user_id; -drop index ix_c_participation_user_id; +alter table if exists info_customer drop constraint if exists fk_info_customer_company_id; -alter table persistent_file_content drop constraint fk_persistent_file_content_pe_1; +alter table if exists inner_report drop constraint if exists fk_inner_report_forecast_id; -alter table person drop constraint fk_person_default_address_oid; -drop index ix_person_default_address_oid; +alter table if exists drel_invoice drop constraint if exists fk_drel_invoice_booking; +drop index if exists ix_drel_invoice_booking; -alter table phones drop constraint fk_phones_person_id; -drop index ix_phones_person_id; +alter table if exists item drop constraint if exists fk_item_etype; +drop index if exists ix_item_etype; -alter table pp_to_ww drop constraint fk_pp_to_ww_pp; -drop index ix_pp_to_ww_pp_id; +alter table if exists item drop constraint if exists fk_item_eregion; +drop index if exists ix_item_eregion; -alter table pp_to_ww drop constraint fk_pp_to_ww_wview; -drop index ix_pp_to_ww_ww_id; +alter table if exists trainer_monkey drop constraint if exists fk_trainer_monkey_trainer; -alter table r_orders drop constraint fk_r_orders_rcustomer; -drop index ix_r_orders_company_customern_1; +alter table if exists trainer_monkey drop constraint if exists fk_trainer_monkey_monkey; -alter table resourcefile drop constraint fk_resourcefile_parentresourc_1; -drop index ix_resourcefile_parentresourc_1; +alter table if exists troop_monkey drop constraint if exists fk_troop_monkey_troop; -alter table mt_role drop constraint fk_mt_role_tenant_id; -drop index ix_mt_role_tenant_id; +alter table if exists troop_monkey drop constraint if exists fk_troop_monkey_monkey; -alter table mt_role_permission drop constraint fk_mt_role_permission_mt_role; -drop index ix_mt_role_permission_mt_role_1; +alter table if exists l2_cldf_reset_bean_child drop constraint if exists fk_l2_cldf_reset_bean_child_parent_id; +drop index if exists ix_l2_cldf_reset_bean_child_parent_id; -alter table mt_role_permission drop constraint fk_mt_role_permission_mt_perm_2; -drop index ix_mt_role_permission_mt_perm_2; +alter table if exists level1_level4 drop constraint if exists fk_level1_level4_level1; +drop index if exists ix_level1_level4_level1; -alter table f_second drop constraint fk_f_second_first; +alter table if exists level1_level4 drop constraint if exists fk_level1_level4_level4; +drop index if exists ix_level1_level4_level4; -alter table section drop constraint fk_section_article_id; -drop index ix_section_article_id; +alter table if exists level1_level2 drop constraint if exists fk_level1_level2_level1; +drop index if exists ix_level1_level2_level1; -alter table self_parent drop constraint fk_self_parent_parent_id; -drop index ix_self_parent_parent_id; +alter table if exists level1_level2 drop constraint if exists fk_level1_level2_level2; +drop index if exists ix_level1_level2_level2; -alter table self_ref_customer drop constraint fk_self_ref_customer_referred_1; -drop index ix_self_ref_customer_referred_1; +alter table if exists level2_level3 drop constraint if exists fk_level2_level3_level2; +drop index if exists ix_level2_level3_level2; -alter table self_ref_example drop constraint fk_self_ref_example_parent_id; -drop index ix_self_ref_example_parent_id; +alter table if exists level2_level3 drop constraint if exists fk_level2_level3_level3; +drop index if exists ix_level2_level3_level3; -alter table stockforecast drop constraint fk_stockforecast_inner_report_1; -drop index ix_stockforecast_inner_report_1; +alter table if exists link drop constraint if exists fk_link_id; -alter table sub_section drop constraint fk_sub_section_section_id; -drop index ix_sub_section_section_id; +alter table if exists la_attr_value_attribute drop constraint if exists fk_la_attr_value_attribute_la_attr_value; +drop index if exists ix_la_attr_value_attribute_la_attr_value; -alter table t_detail_with_other_namexxxyy drop constraint fk_t_detail_with_other_namexx_1; -drop index ix_t_detail_with_other_namexx_1; +alter table if exists la_attr_value_attribute drop constraint if exists fk_la_attr_value_attribute_attribute; +drop index if exists ix_la_attr_value_attribute_attribute; -alter table ts_detail_two drop constraint fk_ts_detail_two_master_id; -drop index ix_ts_detail_two_master_id; +alter table if exists mprinter drop constraint if exists fk_mprinter_current_state_id; +drop index if exists ix_mprinter_current_state_id; -alter table twheel drop constraint fk_twheel_owner_plate_no; -drop index ix_twheel_owner_plate_no; +alter table if exists mprinter drop constraint if exists fk_mprinter_last_swap_cyan_id; -alter table tire drop constraint fk_tire_wheel; +alter table if exists mprinter drop constraint if exists fk_mprinter_last_swap_magenta_id; -alter table trip drop constraint fk_trip_vehicle_driver_id; -drop index ix_trip_vehicle_driver_id; +alter table if exists mprinter drop constraint if exists fk_mprinter_last_swap_yellow_id; -alter table trip drop constraint fk_trip_address_id; -drop index ix_trip_address_id; +alter table if exists mprinter drop constraint if exists fk_mprinter_last_swap_black_id; -alter table type drop constraint fk_type_sub_type_id; -drop index ix_type_sub_type_id; +alter table if exists mprinter_state drop constraint if exists fk_mprinter_state_printer_id; +drop index if exists ix_mprinter_state_printer_id; -alter table ut_detail drop constraint fk_ut_detail_utmaster_id; -drop index ix_ut_detail_utmaster_id; +alter table if exists mprofile drop constraint if exists fk_mprofile_picture_id; +drop index if exists ix_mprofile_picture_id; -alter table uutwo drop constraint fk_uutwo_master_id; -drop index ix_uutwo_master_id; +alter table if exists mrole_muser drop constraint if exists fk_mrole_muser_mrole; +drop index if exists ix_mrole_muser_mrole; -alter table c_user drop constraint fk_c_user_group_id; -drop index ix_c_user_group_id; +alter table if exists mrole_muser drop constraint if exists fk_mrole_muser_muser; +drop index if exists ix_mrole_muser_muser; -alter table oto_user drop constraint fk_oto_user_account_id; +alter table if exists muser drop constraint if exists fk_muser_user_type_id; +drop index if exists ix_muser_user_type_id; -alter table em_user_role drop constraint fk_em_user_role_user_id; -drop index ix_em_user_role_user_id; +alter table if exists mail_user_inbox drop constraint if exists fk_mail_user_inbox_mail_user; +drop index if exists ix_mail_user_inbox_mail_user; -alter table em_user_role drop constraint fk_em_user_role_role_id; -drop index ix_em_user_role_role_id; +alter table if exists mail_user_inbox drop constraint if exists fk_mail_user_inbox_mail_box; +drop index if exists ix_mail_user_inbox_mail_box; -alter table vehicle drop constraint fk_vehicle_truck_ref_id; -drop index ix_vehicle_truck_ref_id; +alter table if exists mail_user_outbox drop constraint if exists fk_mail_user_outbox_mail_user; +drop index if exists ix_mail_user_outbox_mail_user; -alter table vehicle drop constraint fk_vehicle_car_ref_id; -drop index ix_vehicle_car_ref_id; +alter table if exists mail_user_outbox drop constraint if exists fk_mail_user_outbox_mail_box; +drop index if exists ix_mail_user_outbox_mail_box; -alter table vehicle_driver drop constraint fk_vehicle_driver_vehicle_id; -drop index ix_vehicle_driver_vehicle_id; +alter table if exists c_message drop constraint if exists fk_c_message_conversation_id; +drop index if exists ix_c_message_conversation_id; -alter table vehicle_driver drop constraint fk_vehicle_driver_address_id; -drop index ix_vehicle_driver_address_id; +alter table if exists c_message drop constraint if exists fk_c_message_user_id; +drop index if exists ix_c_message_user_id; -alter table warehouses drop constraint fk_warehouses_officezoneid; -drop index ix_warehouses_officezoneid; +alter table if exists mnoc_user_mnoc_role drop constraint if exists fk_mnoc_user_mnoc_role_mnoc_user; +drop index if exists ix_mnoc_user_mnoc_role_mnoc_user; -alter table warehousesshippingzones drop constraint fk_warehousesshippingzones_wa_1; -drop index ix_warehousesshippingzones_wa_1; +alter table if exists mnoc_user_mnoc_role drop constraint if exists fk_mnoc_user_mnoc_role_mnoc_role; +drop index if exists ix_mnoc_user_mnoc_role_mnoc_role; -alter table warehousesshippingzones drop constraint fk_warehousesshippingzones_zo_2; -drop index ix_warehousesshippingzones_sh_2; +alter table if exists mny_b drop constraint if exists fk_mny_b_a_id; +drop index if exists ix_mny_b_a_id; -alter table sa_wheel drop constraint fk_sa_wheel_tire; -drop index ix_sa_wheel_tire; +alter table if exists mny_b_mny_c drop constraint if exists fk_mny_b_mny_c_mny_b; +drop index if exists ix_mny_b_mny_c_mny_b; -alter table sa_wheel drop constraint fk_sa_wheel_car; -drop index ix_sa_wheel_car; +alter table if exists mny_b_mny_c drop constraint if exists fk_mny_b_mny_c_mny_c; +drop index if exists ix_mny_b_mny_c_mny_c; -alter table with_zero drop constraint fk_with_zero_parent_id; -drop index ix_with_zero_parent_id; +alter table if exists subtopics drop constraint if exists fk_subtopics_mny_topic_1; +drop index if exists ix_subtopics_mny_topic_1; + +alter table if exists subtopics drop constraint if exists fk_subtopics_mny_topic_2; +drop index if exists ix_subtopics_mny_topic_2; + +alter table if exists mp_role drop constraint if exists fk_mp_role_mp_user_id; +drop index if exists ix_mp_role_mp_user_id; + +alter table if exists ms_many_a_many_b drop constraint if exists fk_ms_many_a_many_b_ms_many_a; +drop index if exists ix_ms_many_a_many_b_ms_many_a; + +alter table if exists ms_many_a_many_b drop constraint if exists fk_ms_many_a_many_b_ms_many_b; +drop index if exists ix_ms_many_a_many_b_ms_many_b; + +alter table if exists ms_many_b_many_a drop constraint if exists fk_ms_many_b_many_a_ms_many_b; +drop index if exists ix_ms_many_b_many_a_ms_many_b; + +alter table if exists ms_many_b_many_a drop constraint if exists fk_ms_many_b_many_a_ms_many_a; +drop index if exists ix_ms_many_b_many_a_ms_many_a; + +alter table if exists my_lob_size_join_many drop constraint if exists fk_my_lob_size_join_many_parent_id; +drop index if exists ix_my_lob_size_join_many_parent_id; + +alter table if exists o_cached_bean_country drop constraint if exists fk_o_cached_bean_country_o_cached_bean; +drop index if exists ix_o_cached_bean_country_o_cached_bean; + +alter table if exists o_cached_bean_country drop constraint if exists fk_o_cached_bean_country_o_country; +drop index if exists ix_o_cached_bean_country_o_country; + +alter table if exists o_cached_bean_child drop constraint if exists fk_o_cached_bean_child_cached_bean_id; +drop index if exists ix_o_cached_bean_child_cached_bean_id; + +alter table if exists oengine drop constraint if exists fk_oengine_car_id; + +alter table if exists ogear_box drop constraint if exists fk_ogear_box_car_id; + +alter table if exists oroad_show_msg drop constraint if exists fk_oroad_show_msg_company_id; + +alter table if exists om_ordered_detail drop constraint if exists fk_om_ordered_detail_master_id; +drop index if exists ix_om_ordered_detail_master_id; + +alter table if exists o_order drop constraint if exists fk_o_order_kcustomer_id; +drop index if exists ix_o_order_kcustomer_id; + +alter table if exists o_order_detail drop constraint if exists fk_o_order_detail_order_id; +drop index if exists ix_o_order_detail_order_id; + +alter table if exists o_order_detail drop constraint if exists fk_o_order_detail_product_id; +drop index if exists ix_o_order_detail_product_id; + +alter table if exists s_order_items drop constraint if exists fk_s_order_items_order_uuid; +drop index if exists ix_s_order_items_order_uuid; + +alter table if exists or_order_ship drop constraint if exists fk_or_order_ship_order_id; +drop index if exists ix_or_order_ship_order_id; + +alter table if exists oto_bchild drop constraint if exists fk_oto_bchild_master_id; + +alter table if exists oto_child drop constraint if exists fk_oto_child_master_id; + +alter table if exists oto_cust_address drop constraint if exists fk_oto_cust_address_customer_cid; + +alter table if exists oto_prime_extra drop constraint if exists fk_oto_prime_extra_eid; + +alter table if exists oto_th_many drop constraint if exists fk_oto_th_many_oto_th_top_id; +drop index if exists ix_oto_th_many_oto_th_top_id; + +alter table if exists oto_th_one drop constraint if exists fk_oto_th_one_many_id; + +alter table if exists oto_ubprime_extra drop constraint if exists fk_oto_ubprime_extra_eid; + +alter table if exists oto_uprime_extra drop constraint if exists fk_oto_uprime_extra_eid; + +alter table if exists pfile drop constraint if exists fk_pfile_file_content_id; + +alter table if exists pfile drop constraint if exists fk_pfile_file_content2_id; + +alter table if exists paggview drop constraint if exists fk_paggview_pview_id; + +alter table if exists pallet_location drop constraint if exists fk_pallet_location_zone_sid; +drop index if exists ix_pallet_location_zone_sid; + +alter table if exists parcel_location drop constraint if exists fk_parcel_location_parcelid; + +alter table if exists rawinherit_parent_rawinherit_data drop constraint if exists fk_rawinherit_parent_rawinherit_data_rawinherit_parent; +drop index if exists ix_rawinherit_parent_rawinherit_data_rawinherit_parent; + +alter table if exists rawinherit_parent_rawinherit_data drop constraint if exists fk_rawinherit_parent_rawinherit_data_rawinherit_data; +drop index if exists ix_rawinherit_parent_rawinherit_data_rawinherit_data; + +alter table if exists parent_person drop constraint if exists fk_parent_person_some_bean_id; +drop index if exists ix_parent_person_some_bean_id; + +alter table if exists parent_person drop constraint if exists fk_parent_person_parent_identifier; +drop index if exists ix_parent_person_parent_identifier; + +alter table if exists c_participation drop constraint if exists fk_c_participation_conversation_id; +drop index if exists ix_c_participation_conversation_id; + +alter table if exists c_participation drop constraint if exists fk_c_participation_user_id; +drop index if exists ix_c_participation_user_id; + +alter table if exists persistent_file_content drop constraint if exists fk_persistent_file_content_persistent_file_id; + +alter table if exists person drop constraint if exists fk_person_default_address_oid; +drop index if exists ix_person_default_address_oid; + +alter table if exists phones drop constraint if exists fk_phones_person_id; +drop index if exists ix_phones_person_id; + +alter table if exists pp_to_ww drop constraint if exists fk_pp_to_ww_pp; +drop index if exists ix_pp_to_ww_pp; + +alter table if exists pp_to_ww drop constraint if exists fk_pp_to_ww_wview; +drop index if exists ix_pp_to_ww_wview; + +alter table if exists question drop constraint if exists fk_question_groupobjectid; +drop index if exists ix_question_groupobjectid; + +alter table if exists r_orders drop constraint if exists fk_r_orders_customer; +drop index if exists ix_r_orders_customer; + +alter table if exists resourcefile drop constraint if exists fk_resourcefile_parentresourcefileid; +drop index if exists ix_resourcefile_parentresourcefileid; + +alter table if exists mt_role drop constraint if exists fk_mt_role_tenant_id; +drop index if exists ix_mt_role_tenant_id; + +alter table if exists mt_role_permission drop constraint if exists fk_mt_role_permission_mt_role; +drop index if exists ix_mt_role_permission_mt_role; + +alter table if exists mt_role_permission drop constraint if exists fk_mt_role_permission_mt_permission; +drop index if exists ix_mt_role_permission_mt_permission; + +alter table if exists f_second drop constraint if exists fk_f_second_first; + +alter table if exists section drop constraint if exists fk_section_article_id; +drop index if exists ix_section_article_id; + +alter table if exists self_parent drop constraint if exists fk_self_parent_parent_id; +drop index if exists ix_self_parent_parent_id; + +alter table if exists self_ref_customer drop constraint if exists fk_self_ref_customer_referred_by_id; +drop index if exists ix_self_ref_customer_referred_by_id; + +alter table if exists self_ref_example drop constraint if exists fk_self_ref_example_parent_id; +drop index if exists ix_self_ref_example_parent_id; + +alter table if exists stockforecast drop constraint if exists fk_stockforecast_inner_report_id; +drop index if exists ix_stockforecast_inner_report_id; + +alter table if exists sub_section drop constraint if exists fk_sub_section_section_id; +drop index if exists ix_sub_section_section_id; + +alter table if exists tevent_many drop constraint if exists fk_tevent_many_event_id; +drop index if exists ix_tevent_many_event_id; + +alter table if exists tevent_one drop constraint if exists fk_tevent_one_event_id; + +alter table if exists t_detail_with_other_namexxxyy drop constraint if exists fk_t_detail_with_other_namexxxyy_master_id; +drop index if exists ix_t_detail_with_other_namexxxyy_master_id; + +alter table if exists ts_detail_two drop constraint if exists fk_ts_detail_two_master_id; +drop index if exists ix_ts_detail_two_master_id; + +alter table if exists twheel drop constraint if exists fk_twheel_owner_plate_no; +drop index if exists ix_twheel_owner_plate_no; + +alter table if exists tire drop constraint if exists fk_tire_wheel; + +alter table if exists trip drop constraint if exists fk_trip_vehicle_driver_id; +drop index if exists ix_trip_vehicle_driver_id; + +alter table if exists trip drop constraint if exists fk_trip_address_id; +drop index if exists ix_trip_address_id; + +alter table if exists type drop constraint if exists fk_type_sub_type_id; +drop index if exists ix_type_sub_type_id; + +alter table if exists ut_detail drop constraint if exists fk_ut_detail_utmaster_id; +drop index if exists ix_ut_detail_utmaster_id; + +alter table if exists uutwo drop constraint if exists fk_uutwo_master_id; +drop index if exists ix_uutwo_master_id; + +alter table if exists c_user drop constraint if exists fk_c_user_group_id; +drop index if exists ix_c_user_group_id; + +alter table if exists oto_user drop constraint if exists fk_oto_user_account_id; + +alter table if exists em_user_role drop constraint if exists fk_em_user_role_user_id; +drop index if exists ix_em_user_role_user_id; + +alter table if exists em_user_role drop constraint if exists fk_em_user_role_role_id; +drop index if exists ix_em_user_role_role_id; + +alter table if exists vehicle drop constraint if exists fk_vehicle_car_ref_id; +drop index if exists ix_vehicle_car_ref_id; + +alter table if exists vehicle drop constraint if exists fk_vehicle_truck_ref_id; +drop index if exists ix_vehicle_truck_ref_id; + +alter table if exists vehicle_driver drop constraint if exists fk_vehicle_driver_vehicle_id; +drop index if exists ix_vehicle_driver_vehicle_id; + +alter table if exists vehicle_driver drop constraint if exists fk_vehicle_driver_address_id; +drop index if exists ix_vehicle_driver_address_id; + +alter table if exists warehouses drop constraint if exists fk_warehouses_officezoneid; +drop index if exists ix_warehouses_officezoneid; + +alter table if exists warehousesshippingzones drop constraint if exists fk_warehousesshippingzones_warehouses; +drop index if exists ix_warehousesshippingzones_warehouses; + +alter table if exists warehousesshippingzones drop constraint if exists fk_warehousesshippingzones_zones; +drop index if exists ix_warehousesshippingzones_zones; + +alter table if exists sa_wheel drop constraint if exists fk_sa_wheel_tire; +drop index if exists ix_sa_wheel_tire; + +alter table if exists sa_wheel drop constraint if exists fk_sa_wheel_car; +drop index if exists ix_sa_wheel_car; + +alter table if exists g_who_props_otm drop constraint if exists fk_g_who_props_otm_who_created_id; +drop index if exists ix_g_who_props_otm_who_created_id; + +alter table if exists g_who_props_otm drop constraint if exists fk_g_who_props_otm_who_modified_id; +drop index if exists ix_g_who_props_otm_who_modified_id; + +alter table if exists with_zero drop constraint if exists fk_with_zero_parent_id; +drop index if exists ix_with_zero_parent_id; drop table if exists asimple_bean cascade; @@ -342,11 +575,15 @@ drop table if exists bar cascade; drop table if exists oto_account cascade; -drop table if exists o_address cascade; +drop table if exists addr cascade; drop table if exists address cascade; -drop table if exists animals cascade; +drop table if exists o_address cascade; + +drop table if exists album cascade; + +drop table if exists animal cascade; drop table if exists animal_shelter cascade; @@ -364,6 +601,16 @@ drop table if exists bbookmark_user cascade; drop table if exists bsimple_with_gen cascade; +drop table if exists bsite cascade; + +drop table if exists bsite_user cascade; + +drop table if exists bsite_user_b cascade; + +drop table if exists bsite_user_c cascade; + +drop table if exists buser cascade; + drop table if exists bwith_qident cascade; drop table if exists basic_joda_entity cascade; @@ -373,6 +620,8 @@ drop table if exists bean_with_time_zone cascade; drop table if exists drel_booking cascade; drop sequence if exists drel_booking_seq; +drop table if exists cinh_root cascade; + drop table if exists ckey_assoc cascade; drop table if exists ckey_detail cascade; @@ -393,6 +642,12 @@ drop table if exists sp_car_car_wheels cascade; drop table if exists car_accessory cascade; +drop table if exists car_fuse cascade; + +drop table if exists category cascade; + +drop table if exists child_person cascade; + drop table if exists configuration cascade; drop table if exists configurations cascade; @@ -407,16 +662,62 @@ drop table if exists c_conversation cascade; drop table if exists o_country cascade; +drop table if exists cover cascade; + drop table if exists o_customer cascade; +drop table if exists dcredit cascade; + +drop table if exists dcredit_drol cascade; + drop table if exists dexh_entity cascade; drop table if exists dperson cascade; +drop table if exists drol cascade; + +drop table if exists drot cascade; + +drop table if exists drot_drol cascade; + drop table if exists rawinherit_data cascade; +drop table if exists dfk_cascade cascade; + +drop table if exists dfk_cascade_one cascade; + +drop table if exists dfk_none cascade; + +drop table if exists dfk_none_via_join cascade; + +drop table if exists dfk_one cascade; + +drop table if exists dfk_set_null cascade; + +drop table if exists doc cascade; + +drop table if exists doc_link cascade; + +drop table if exists doc_link_draft cascade; + +drop table if exists doc_draft cascade; + +drop table if exists document cascade; + +drop table if exists document_draft cascade; + +drop table if exists document_media cascade; + +drop table if exists document_media_draft cascade; + +drop table if exists earray_bean cascade; + +drop table if exists earray_set_bean cascade; + drop table if exists e_basic cascade; +drop table if exists ebasic_change_log cascade; + drop table if exists ebasic_clob cascade; drop table if exists ebasic_clob_fetch_eager cascade; @@ -429,12 +730,20 @@ drop table if exists e_basicenc_bin cascade; drop table if exists e_basic_enum_id cascade; +drop table if exists e_basic_eni cascade; + +drop table if exists ebasic_hstore cascade; + +drop table if exists ebasic_json_list cascade; + drop table if exists ebasic_json_map cascade; drop table if exists ebasic_json_map_blob cascade; drop table if exists ebasic_json_map_clob cascade; +drop table if exists ebasic_json_map_detail cascade; + drop table if exists ebasic_json_map_json_b cascade; drop table if exists ebasic_json_map_varchar cascade; @@ -447,14 +756,26 @@ drop table if exists ebasic_json_node_json_b cascade; drop table if exists ebasic_json_node_varchar cascade; +drop table if exists ebasic_json_unmapped cascade; + drop table if exists e_basic_ndc cascade; +drop table if exists ebasic_no_sdchild cascade; + +drop table if exists ebasic_sdchild cascade; + +drop table if exists ebasic_soft_delete cascade; + drop table if exists e_basicver cascade; drop table if exists e_basic_withlife cascade; drop table if exists e_basicverucon cascade; +drop table if exists e_col_ab cascade; + +drop table if exists ecustom_id cascade; + drop table if exists eemb_inner cascade; drop table if exists eemb_outer cascade; @@ -477,12 +798,42 @@ drop table if exists eopt_one_c cascade; drop table if exists eperson cascade; +drop table if exists e_person_online cascade; + drop table if exists esimple cascade; +drop table if exists esoft_del_book cascade; + +drop table if exists esoft_del_book_esoft_del_user cascade; + +drop table if exists esoft_del_down cascade; + +drop table if exists esoft_del_mid cascade; + +drop table if exists esoft_del_one_a cascade; + +drop table if exists esoft_del_one_b cascade; + +drop table if exists esoft_del_role cascade; + +drop table if exists esoft_del_role_esoft_del_user cascade; + +drop table if exists esoft_del_top cascade; + +drop table if exists esoft_del_up cascade; + +drop table if exists esoft_del_user cascade; + +drop table if exists esoft_del_user_esoft_del_role cascade; + +drop table if exists esome_convert_type cascade; + drop table if exists esome_type cascade; drop table if exists etrans_many cascade; +drop table if exists rawinherit_uncle cascade; + drop table if exists evanilla_collection cascade; drop table if exists evanilla_collection_detail cascade; @@ -495,6 +846,8 @@ drop table if exists td_child cascade; drop table if exists td_parent cascade; +drop table if exists empl cascade; + drop table if exists feature_desc cascade; drop table if exists f_first cascade; @@ -504,12 +857,49 @@ drop table if exists foo cascade; drop table if exists gen_key_identity cascade; drop table if exists gen_key_sequence cascade; -drop sequence if exists seq; +drop sequence if exists SEQ; drop table if exists gen_key_table cascade; +drop table if exists grand_parent_person cascade; + +drop table if exists survey_group cascade; + drop table if exists c_group cascade; +drop table if exists he_doc cascade; + +drop trigger if exists hx_link_history_upd on hx_link cascade; +drop function if exists hx_link_history_version(); + +drop view hx_link_with_history; +alter table hx_link drop column sys_period; +drop table hx_link_history; + +drop table if exists hx_link cascade; + +drop table if exists hx_link_doc cascade; + +drop table if exists hi_doc cascade; + +drop trigger if exists hi_link_history_upd on hi_link cascade; +drop function if exists hi_link_history_version(); + +drop view hi_link_with_history; +alter table hi_link drop column sys_period; +drop table hi_link_history; + +drop table if exists hi_link cascade; + +drop trigger if exists hi_link_doc_history_upd on hi_link_doc cascade; +drop function if exists hi_link_doc_history_version(); + +drop view hi_link_doc_with_history; +alter table hi_link_doc drop column sys_period; +drop table hi_link_doc_history; + +drop table if exists hi_link_doc cascade; + drop table if exists imrelated cascade; drop table if exists imroot cascade; @@ -529,6 +919,20 @@ drop sequence if exists drel_invoice_seq; drop table if exists item cascade; +drop table if exists monkey cascade; + +drop table if exists trainer cascade; + +drop table if exists trainer_monkey cascade; + +drop table if exists troop cascade; + +drop table if exists troop_monkey cascade; + +drop table if exists l2_cldf_reset_bean cascade; + +drop table if exists l2_cldf_reset_bean_child cascade; + drop table if exists level1 cascade; drop table if exists level1_level4 cascade; @@ -543,6 +947,17 @@ drop table if exists level3 cascade; drop table if exists level4 cascade; +drop trigger if exists link_history_upd on link cascade; +drop function if exists link_history_version(); + +drop view link_with_history; +alter table link drop column sys_period; +drop table link_history; + +drop table if exists link cascade; + +drop table if exists link_draft cascade; + drop table if exists la_attr_value cascade; drop table if exists la_attr_value_attribute cascade; @@ -569,6 +984,14 @@ drop table if exists muser cascade; drop table if exists muser_type cascade; +drop table if exists mail_box cascade; + +drop table if exists mail_user cascade; + +drop table if exists mail_user_inbox cascade; + +drop table if exists mail_user_outbox cascade; + drop table if exists map_super_actual cascade; drop table if exists c_message cascade; @@ -579,10 +1002,30 @@ drop table if exists mnoc_user cascade; drop table if exists mnoc_user_mnoc_role cascade; +drop table if exists mny_a cascade; + +drop table if exists mny_b cascade; + +drop table if exists mny_b_mny_c cascade; + +drop table if exists mny_c cascade; + +drop table if exists mny_topic cascade; + +drop table if exists subtopics cascade; + drop table if exists mp_role cascade; drop table if exists mp_user cascade; +drop table if exists ms_many_a cascade; + +drop table if exists ms_many_a_many_b cascade; + +drop table if exists ms_many_b cascade; + +drop table if exists ms_many_b_many_a cascade; + drop table if exists my_lob_size cascade; drop table if exists my_lob_size_join_many cascade; @@ -595,12 +1038,24 @@ drop table if exists o_cached_bean_country cascade; drop table if exists o_cached_bean_child cascade; +drop table if exists o_cached_natkey cascade; + +drop table if exists o_cached_natkey3 cascade; + drop table if exists ocar cascade; +drop table if exists ocompany cascade; + drop table if exists oengine cascade; drop table if exists ogear_box cascade; +drop table if exists oroad_show_msg cascade; + +drop table if exists om_ordered_detail cascade; + +drop table if exists om_ordered_master cascade; + drop table if exists o_order cascade; drop table if exists o_order_detail cascade; @@ -611,10 +1066,38 @@ drop table if exists s_order_items cascade; drop table if exists or_order_ship cascade; +drop table if exists organisation cascade; + +drop table if exists oto_bchild cascade; + +drop table if exists oto_bmaster cascade; + drop table if exists oto_child cascade; +drop table if exists oto_cust cascade; + +drop table if exists oto_cust_address cascade; + drop table if exists oto_master cascade; +drop table if exists oto_prime cascade; + +drop table if exists oto_prime_extra cascade; + +drop table if exists oto_th_many cascade; + +drop table if exists oto_th_one cascade; + +drop table if exists oto_th_top cascade; + +drop table if exists oto_ubprime cascade; + +drop table if exists oto_ubprime_extra cascade; + +drop table if exists oto_uprime cascade; + +drop table if exists oto_uprime_extra cascade; + drop table if exists pfile cascade; drop table if exists pfile_content cascade; @@ -629,7 +1112,9 @@ drop table if exists parcel_location cascade; drop table if exists rawinherit_parent cascade; -drop table if exists rawinherit_parent_rawinherit_dat cascade; +drop table if exists rawinherit_parent_rawinherit_data cascade; + +drop table if exists parent_person cascade; drop table if exists c_participation cascade; @@ -645,12 +1130,16 @@ drop table if exists person cascade; drop table if exists phones cascade; +drop table if exists primary_revision cascade; + drop table if exists o_product cascade; drop table if exists pp cascade; drop table if exists pp_to_ww cascade; +drop table if exists question cascade; + drop table if exists rcustomer cascade; drop table if exists r_orders cascade; @@ -659,12 +1148,12 @@ drop table if exists region cascade; drop table if exists resourcefile cascade; +drop table if exists em_role cascade; + drop table if exists mt_role cascade; drop table if exists mt_role_permission cascade; -drop table if exists em_role cascade; - drop table if exists f_second cascade; drop table if exists section cascade; @@ -689,10 +1178,18 @@ drop table if exists sub_section cascade; drop table if exists sub_type cascade; +drop table if exists survey cascade; + drop table if exists tbytes_only cascade; drop table if exists tcar cascade; +drop table if exists tevent cascade; + +drop table if exists tevent_many cascade; + +drop table if exists tevent_one cascade; + drop table if exists tint_root cascade; drop table if exists tjoda_entity cascade; @@ -719,18 +1216,22 @@ drop table if exists twith_pre_insert cascade; drop table if exists mt_tenant cascade; -drop table if exists sa_tire cascade; -drop sequence if exists sa_tire_seq; +drop table if exists test_annotation_base_entity cascade; drop table if exists tire cascade; drop sequence if exists tire_seq; +drop table if exists sa_tire cascade; +drop sequence if exists sa_tire_seq; + drop table if exists trip cascade; drop table if exists truck_ref cascade; drop table if exists type cascade; +drop table if exists tz_bean cascade; + drop table if exists ut_detail cascade; drop table if exists ut_master cascade; @@ -739,11 +1240,20 @@ drop table if exists uuone cascade; drop table if exists uutwo cascade; -drop table if exists em_user cascade; +drop trigger if exists c_user_history_upd on c_user cascade; +drop function if exists c_user_history_version(); + +drop view c_user_with_history; +alter table c_user drop column sys_period; +drop table c_user_history; + +drop table if exists c_user cascade; drop table if exists tx_user cascade; -drop table if exists c_user cascade; +drop table if exists g_user cascade; + +drop table if exists em_user cascade; drop table if exists oto_user cascade; @@ -760,11 +1270,13 @@ drop table if exists warehousesshippingzones cascade; drop table if exists sa_wheel cascade; drop sequence if exists sa_wheel_seq; +drop table if exists wheel cascade; +drop sequence if exists wheel_seq; + drop table if exists sp_car_wheel cascade; drop sequence if exists sp_car_wheel_seq; -drop table if exists wheel cascade; -drop sequence if exists wheel_seq; +drop table if exists g_who_props_otm cascade; drop table if exists with_zero cascade; @@ -774,3 +1286,5 @@ drop table if exists wview cascade; drop table if exists zones cascade; +drop index if exists ix_contact_last_name_first_name; +drop index if exists ix_e_basic_name;