Skip to content

Update Docker Image #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 13, 2017
25 changes: 25 additions & 0 deletions common_oltp/01_common_oltp_main_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,28 @@ lock mode row;

revoke all on user_social_login from 'public';

CREATE TABLE informix.sso_login_provider (
sso_login_provider_id DECIMAL(10,0) NOT NULL,
name VARCHAR(50),
type VARCHAR(50) NOT NULL
)
extent size 64 next size 64
lock mode row;

revoke all on sso_login_provider from 'public';

CREATE TABLE informix.user_sso_login (
user_id DECIMAL(10,0) NOT NULL,
sso_user_id VARCHAR(100) NOT NULL,
sso_user_name VARCHAR(100),
provider_id DECIMAL(10,0) NOT NULL,
email VARCHAR(100)
)
extent size 64 next size 64
lock mode row;

revoke all on user_sso_login from 'public';


CREATE SEQUENCE "informix".CONTEST_ELIGIBILITY_SEQ INCREMENT BY 1 START WITH 1 MINVALUE 1;

Expand Down Expand Up @@ -2394,3 +2416,6 @@ grant select,update,insert,delete on email_request to public as informix;
grant select,update,insert,delete on social_login_provider to public as informix;
grant select,update,insert,delete on user_social_login to public as informix;
grant select,update,insert,delete on terms_of_use_docusign_template_xref to public as informix;

grant select,update,insert,delete,index on sso_login_provider to public as informix;
grant select,update,insert,delete,index on user_sso_login to public as informix;
1 change: 1 addition & 0 deletions common_oltp/02_common_oltp_data_setup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ INSERT INTO 'informix'.achievement_type_lu(achievement_type_id,achievement_type_
INSERT INTO 'informix'.achievement_type_lu(achievement_type_id,achievement_type_desc) VALUES (14, 'Crowd for Good Badge');
INSERT INTO 'informix'.achievement_type_lu(achievement_type_id,achievement_type_desc) VALUES (15, 'Predix Community');
INSERT INTO 'informix'.achievement_type_lu(achievement_type_id,achievement_type_desc) VALUES (16, 'IBM Cognitive Community');
INSERT INTO 'informix'.achievement_type_lu(achievement_type_id,achievement_type_desc) VALUES (17, 'SRM Engagement Honor');
INSERT INTO 'informix'.bounce_type_lu(bounce_type,bounce_type_desc) VALUES ('HB', 'Hard Bounce');
INSERT INTO 'informix'.bounce_type_lu(bounce_type,bounce_type_desc) VALUES ('SB', 'Soft Bounce - General');
INSERT INTO 'informix'.bounce_type_lu(bounce_type,bounce_type_desc) VALUES ('SBDF', 'Soft Bounce - Dns Failure');
Expand Down
25 changes: 25 additions & 0 deletions common_oltp/03_common_oltp_constraints_and_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,20 @@ alter table 'informix'.user_social_login add constraint primary key
(user_id, social_login_provider_id)
constraint user_social_prkey;

alter table 'informix'.sso_login_provider add constraint primary key
(sso_login_provider_id)
constraint sso_provider_prkey;

alter table 'informix'.user_sso_login add constraint primary key
(user_id, provider_id)
constraint user_sso_prkey;

create index 'informix'.idx_user_social_login_sso_user_id_provider_id on 'informix'.user_sso_login
(
sso_user_id,
provider_id
);

alter table 'informix'.user_role_xref add constraint foreign key
(login_id)
references 'informix'.security_user
Expand Down Expand Up @@ -1128,3 +1142,14 @@ alter table 'informix'.user_social_login add constraint foreign key
(user_id)
constraint user_social_user_fk;

alter table 'informix'.user_sso_login add constraint foreign key
(user_id)
references 'informix'.user
(user_id)
constraint user_sso_login_user_fk;

alter table 'informix'.user_sso_login add constraint foreign key
(provider_id)
references 'informix'.sso_login_provider
(sso_login_provider_id)
constraint user_sso_login_provider_fk;
4 changes: 3 additions & 1 deletion tco_setup/tco17_eligible_contests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ WHERE p.project_status_id = 1
and p.project_id not in (select project_id from contest_project_xref where contest_id in (631, 583)) -- make sure we exclude from tco
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
and (select lower(value) from project_info where project_id = p.project_id and project_info_type_id = 6) not like 'ibm cognitive%'; -- exclude IBM Cognitive Community Segment
and (select lower(value) from project_info where project_id = p.project_id and project_info_type_id = 6) not like 'ibm cognitive%' -- exclude IBM Cognitive Community Segment
and p.project_id not in (30057968); -- exclude specific challenges
-- and mod(p.project_id, 2) = 0;


Expand Down Expand Up @@ -305,6 +306,7 @@ WHERE p.project_status_id = 1
and p.project_id not in (select project_id from contest_project_xref where contest_id in (616, 583)) -- make sure we exclude from tco
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
and p.project_id not in (30057968,30057832,30057829,30057831) -- exclude specific challenges
and (select lower(value) from project_info where project_id = p.project_id and project_info_type_id = 6) not like 'ibm cognitive%'; -- exclude IBM Cognitive Community Segment
-- and mod(p.project_id, 2) = 0;

Expand Down
Loading