-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Jan 31, 2023
1 parent
795d6e9
commit 56bda6b
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Workbench/grouper_data/container_files/mysql/createDBforMP.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| CREATE DATABASE grouper_to_midpoint CHARACTER SET utf8 COLLATE utf8_bin; | ||
| CREATE USER 'grouper'@'%' IDENTIFIED BY 'password'; | ||
| CREATE USER 'grouper'@'localhost' IDENTIFIED BY 'password'; | ||
| GRANT ALL PRIVILEGES ON * . * TO 'grouper'@'%'; | ||
| GRANT ALL PRIVILEGES ON * . * TO 'grouper'@'localhost'; | ||
| FLUSH PRIVILEGES; | ||
|
|
60 changes: 60 additions & 0 deletions
60
Workbench/grouper_data/container_files/mysql/setupDBforMP.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| USE grouper_to_midpoint; | ||
| CREATE TABLE gr_mp_groups ( | ||
| group_name varchar(1024) DEFAULT NULL, | ||
| id_index bigint NOT NULL, | ||
| display_name varchar(1024) DEFAULT NULL, | ||
| description varchar(1024) DEFAULT NULL, | ||
| last_modified bigint NOT NULL, | ||
| deleted varchar(1) NOT NULL, | ||
| PRIMARY KEY (id_index), | ||
| UNIQUE KEY gr_mp_groups_ldx (last_modified), | ||
| UNIQUE KEY gr_mp_groups_idx (id_index), | ||
| KEY gr_mp_groups_ddx (display_name(255)), | ||
| KEY gr_mp_groups_gdx (group_name(255)) | ||
| ); | ||
|
|
||
| CREATE TABLE gr_mp_group_attributes ( | ||
| group_id_index bigint NOT NULL, | ||
| attribute_name varchar(1000) NOT NULL, | ||
| attribute_value varchar(4000) DEFAULT NULL, | ||
| last_modified bigint NOT NULL, | ||
| deleted varchar(1) NOT NULL, | ||
| UNIQUE KEY gr_mp_group_attributes_ldx (last_modified), | ||
| UNIQUE KEY gr_mp_group_attributes_idx (group_id_index,attribute_name(100),attribute_value(155)), | ||
| CONSTRAINT gr_mp_group_attributes_fk FOREIGN KEY (group_id_index) REFERENCES gr_mp_groups (id_index) | ||
| ); | ||
|
|
||
| CREATE TABLE gr_mp_subjects ( | ||
| subject_id_index bigint NOT NULL, | ||
| subject_id varchar(1024) DEFAULT NULL, | ||
| last_modified bigint NOT NULL, | ||
| deleted varchar(1) NOT NULL, | ||
| PRIMARY KEY (subject_id_index), | ||
| UNIQUE KEY gr_mp_subjects_ldx (last_modified), | ||
| UNIQUE KEY gr_mp_subjects_idx (subject_id_index), | ||
| KEY gr_mp_subjects_sdx (subject_id(255)) | ||
| ); | ||
|
|
||
| CREATE TABLE gr_mp_subject_attributes ( | ||
| subject_id_index bigint NOT NULL, | ||
| attribute_name varchar(1000) NOT NULL, | ||
| attribute_value varchar(4000) DEFAULT NULL, | ||
| last_modified bigint NOT NULL, | ||
| deleted varchar(1) NOT NULL, | ||
| UNIQUE KEY gr_mp_subject_attributes_ldx (last_modified), | ||
| UNIQUE KEY gr_mp_subject_attributes_idx (subject_id_index,attribute_name(100),attribute_value(155)), | ||
| CONSTRAINT gr_mp_subject_attributes_fk FOREIGN KEY (subject_id_index) REFERENCES gr_mp_subjects (subject_id_index) | ||
| ); | ||
|
|
||
| CREATE TABLE gr_mp_memberships ( | ||
| group_id_index bigint NOT NULL, | ||
| subject_id_index bigint NOT NULL, | ||
| last_modified bigint NOT NULL, | ||
| deleted varchar(1) NOT NULL, | ||
| UNIQUE KEY gr_mp_memberships_ldx (last_modified), | ||
| UNIQUE KEY gr_mp_memberships_idx (group_id_index,subject_id_index), | ||
| KEY gr_mp_memberships_sfk (subject_id_index), | ||
| CONSTRAINT gr_mp_memberships_gfk FOREIGN KEY (group_id_index) REFERENCES gr_mp_groups (id_index), | ||
| CONSTRAINT gr_mp_memberships_sfk FOREIGN KEY (subject_id_index) REFERENCES gr_mp_subjects (subject_id_index) | ||
| ); | ||
|
|