Versions 2018.2 (mysql)
This commit is contained in:
parent
0238e1b4c5
commit
b341335eaa
|
@ -1,29 +1,26 @@
|
||||||
USE orbeon;
|
ALTER DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||||
set sql_mode='ALLOW_INVALID_DATES';
|
|
||||||
|
|
||||||
ALTER DATABASE CHARACTER SET utf8 COLLATE utf8_general_ci;
|
|
||||||
|
|
||||||
CREATE TABLE orbeon_form_definition (
|
CREATE TABLE orbeon_form_definition (
|
||||||
created TIMESTAMP(6) ,
|
created TIMESTAMP(6) ,
|
||||||
last_modified_time TIMESTAMP(6) ,
|
last_modified_time TIMESTAMP(6) ,
|
||||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
last_modified_by VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
app VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
form VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form_version INT NOT NULL,
|
form_version INT NOT NULL,
|
||||||
form_metadata VARCHAR(4000) COLLATE utf8_bin ,
|
form_metadata VARCHAR(4000) COLLATE utf8mb4_bin ,
|
||||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
deleted CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
xml MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci
|
xml MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
CREATE TABLE orbeon_form_definition_attach (
|
CREATE TABLE orbeon_form_definition_attach (
|
||||||
created TIMESTAMP(6) ,
|
created TIMESTAMP(6) ,
|
||||||
last_modified_time TIMESTAMP(6) ,
|
last_modified_time TIMESTAMP(6) ,
|
||||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
last_modified_by VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
app VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
form VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form_version INT NOT NULL,
|
form_version INT NOT NULL,
|
||||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
deleted CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
file_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
file_name VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
file_content LONGBLOB
|
file_content LONGBLOB
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
|
@ -31,40 +28,40 @@ CREATE TABLE orbeon_form_data (
|
||||||
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
||||||
created TIMESTAMP(6) ,
|
created TIMESTAMP(6) ,
|
||||||
last_modified_time TIMESTAMP(6) ,
|
last_modified_time TIMESTAMP(6) ,
|
||||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
last_modified_by VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
username VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
groupname VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
organization_id INT ,
|
organization_id INT ,
|
||||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
app VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
form VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form_version INT NOT NULL,
|
form_version INT NOT NULL,
|
||||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
document_id VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
draft CHAR(1) COLLATE utf8_bin NOT NULL,
|
draft CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
deleted CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
xml MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci
|
xml MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
CREATE TABLE orbeon_form_data_attach (
|
CREATE TABLE orbeon_form_data_attach (
|
||||||
created TIMESTAMP(6) ,
|
created TIMESTAMP(6) ,
|
||||||
last_modified_time TIMESTAMP(6) ,
|
last_modified_time TIMESTAMP(6) ,
|
||||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
last_modified_by VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
username VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
groupname VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
organization_id INT ,
|
organization_id INT ,
|
||||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
app VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
form VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
form_version INT NOT NULL,
|
form_version INT NOT NULL,
|
||||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
document_id VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
draft CHAR(1) COLLATE utf8_bin NOT NULL,
|
draft CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
deleted CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
file_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
file_name VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
file_content LONGBLOB
|
file_content LONGBLOB
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
CREATE TABLE orbeon_form_data_lease (
|
CREATE TABLE orbeon_form_data_lease (
|
||||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL PRIMARY KEY,
|
document_id VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL PRIMARY KEY,
|
||||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ,
|
username VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL ,
|
||||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
groupname VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
expiration TIMESTAMP(6) NOT NULL
|
expiration TIMESTAMP(6) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -72,7 +69,7 @@ CREATE TABLE orbeon_organization (
|
||||||
id INT NOT NULL,
|
id INT NOT NULL,
|
||||||
depth INT NOT NULL,
|
depth INT NOT NULL,
|
||||||
pos INT NOT NULL,
|
pos INT NOT NULL,
|
||||||
name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
|
name VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
CREATE TABLE orbeon_seq (
|
CREATE TABLE orbeon_seq (
|
||||||
|
@ -83,29 +80,32 @@ CREATE TABLE orbeon_i_current (
|
||||||
data_id INT NOT NULL,
|
data_id INT NOT NULL,
|
||||||
created TIMESTAMP(6) NOT NULL,
|
created TIMESTAMP(6) NOT NULL,
|
||||||
last_modified_time TIMESTAMP(6) NOT NULL,
|
last_modified_time TIMESTAMP(6) NOT NULL,
|
||||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
last_modified_by VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
username VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
groupname VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ,
|
||||||
organization_id INT ,
|
organization_id INT ,
|
||||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
app VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
form VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||||
form_version INT NOT NULL,
|
form_version INT NOT NULL,
|
||||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
document_id VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||||
draft CHAR(1) NOT NULL,
|
draft CHAR(1) COLLATE utf8mb4_bin NOT NULL,
|
||||||
FOREIGN KEY (data_id) REFERENCES orbeon_form_data(id)
|
FOREIGN KEY (data_id) REFERENCES orbeon_form_data(id)
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
CREATE TABLE orbeon_i_control_text (
|
CREATE TABLE orbeon_i_control_text (
|
||||||
data_id INT NOT NULL,
|
data_id INT NOT NULL,
|
||||||
pos INT NOT NULL,
|
pos INT NOT NULL,
|
||||||
control VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
control VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||||
val MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
val MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
FOREIGN KEY (data_id) REFERENCES orbeon_form_data(id)
|
FOREIGN KEY (data_id) REFERENCES orbeon_form_data(id)
|
||||||
) ENGINE = InnoDB;
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
CREATE INDEX orbeon_form_definition_i1 ON orbeon_form_definition (app, form);
|
CREATE INDEX orbeon_form_definition_i1 ON orbeon_form_definition (app, form);
|
||||||
CREATE INDEX orbeon_form_definition_att_i1 ON orbeon_form_definition_attach (app, form, file_name);
|
CREATE INDEX orbeon_form_definition_att_i1 ON orbeon_form_definition_attach (app, form, file_name);
|
||||||
CREATE INDEX orbeon_from_data_i1 ON orbeon_form_data (app, form, document_id, draft);
|
CREATE INDEX orbeon_from_data_i1 ON orbeon_form_data (app, form, document_id, draft);
|
||||||
CREATE INDEX orbeon_from_data_attach_i1 ON orbeon_form_data_attach (app, form, document_id, file_name, draft);
|
CREATE INDEX orbeon_form_data_i2 ON orbeon_form_data (document_id);
|
||||||
|
CREATE INDEX orbeon_from_data_attach_i1 ON orbeon_form_data_attach (app, form, document_id, draft);
|
||||||
|
CREATE INDEX orbeon_from_data_attach_i2 ON orbeon_form_data_attach (document_id);
|
||||||
CREATE UNIQUE INDEX orbeon_i_current_i1 ON orbeon_i_current (data_id, draft);
|
CREATE UNIQUE INDEX orbeon_i_current_i1 ON orbeon_i_current (data_id, draft);
|
||||||
|
CREATE INDEX orbeon_i_current_i2 ON orbeon_i_current (app, form, draft);
|
||||||
CREATE INDEX orbeon_i_control_text_i1 ON orbeon_i_control_text (data_id);
|
CREATE INDEX orbeon_i_control_text_i1 ON orbeon_i_control_text (data_id);
|
Loading…
Reference in New Issue