diff --git a/api/chalicelib/core/autocomplete.py b/api/chalicelib/core/autocomplete.py index cd908a1b5..3ad845a14 100644 --- a/api/chalicelib/core/autocomplete.py +++ b/api/chalicelib/core/autocomplete.py @@ -52,7 +52,6 @@ def __get_autocomplete_table(value, project_id): "c_list": tuple(c_list) }) try: - print(query) cur.execute(query) except Exception as err: print("--------- AUTOCOMPLETE SEARCH QUERY EXCEPTION -----------") diff --git a/api/chalicelib/core/significance.py b/api/chalicelib/core/significance.py index d6f46da70..d31b8aea0 100644 --- a/api/chalicelib/core/significance.py +++ b/api/chalicelib/core/significance.py @@ -495,7 +495,7 @@ def get_issues(stages, rows, first_stage=None, last_stage=None, drop_only=False) all_issues_with_context, first_stage, last_stage) - print("len(transitions) =", len(transitions)) + # print("len(transitions) =", len(transitions)) if any(all_errors): total_drop_corr, conf, is_sign = pearson_corr(transitions, all_errors) diff --git a/ee/api/chalicelib/core/significance.py b/ee/api/chalicelib/core/significance.py index 600d86c75..3aa701f97 100644 --- a/ee/api/chalicelib/core/significance.py +++ b/ee/api/chalicelib/core/significance.py @@ -502,7 +502,7 @@ def get_issues(stages, rows, first_stage=None, last_stage=None, drop_only=False) all_issues_with_context, first_stage, last_stage) - print("len(transitions) =", len(transitions)) + # print("len(transitions) =", len(transitions)) if any(all_errors): total_drop_corr, conf, is_sign = pearson_corr(transitions, all_errors) diff --git a/ee/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql b/ee/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql index e495a8e54..f02f9e0a8 100644 --- a/ee/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql +++ b/ee/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql @@ -23,5 +23,16 @@ ON CONFLICT (predefined_key) DO UPDATE metric_type=excluded.metric_type, view_type=excluded.view_type; +ALTER TABLE IF EXISTS oauth_authentication + DROP CONSTRAINT IF EXISTS oauth_authentication_user_id_provider_provider_user_id_key; + +DROP INDEX IF EXISTS oauth_authentication_user_id_provider_provider_user_id_key; + +ALTER TABLE IF EXISTS oauth_authentication + DROP CONSTRAINT IF EXISTS oauth_authentication_user_id_provider_key; + +DROP INDEX IF EXISTS oauth_authentication_user_id_provider_key; + +CREATE UNIQUE INDEX IF NOT EXISTS oauth_authentication_unique_user_id_provider_idx ON oauth_authentication (user_id, provider); COMMIT; \ No newline at end of file diff --git a/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql b/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql index 38fa6572f..723b8eb09 100644 --- a/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql +++ b/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql @@ -221,10 +221,9 @@ $$ user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE, provider oauth_provider NOT NULL, provider_user_id text NOT NULL, - token text NOT NULL, - UNIQUE (user_id, provider) + token text NOT NULL ); - + CREATE UNIQUE INDEX IF NOT EXISTS oauth_authentication_unique_user_id_provider_idx ON oauth_authentication(user_id,provider); CREATE TABLE IF NOT EXISTS projects ( diff --git a/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql b/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql index 34d57d75e..c621da9c7 100644 --- a/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql +++ b/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql @@ -23,5 +23,16 @@ ON CONFLICT (predefined_key) DO UPDATE metric_type=excluded.metric_type, view_type=excluded.view_type; +ALTER TABLE IF EXISTS oauth_authentication + DROP CONSTRAINT IF EXISTS oauth_authentication_user_id_provider_provider_user_id_key; + +DROP INDEX IF EXISTS oauth_authentication_user_id_provider_provider_user_id_key; + +ALTER TABLE IF EXISTS oauth_authentication + DROP CONSTRAINT IF EXISTS oauth_authentication_user_id_provider_key; + +DROP INDEX IF EXISTS oauth_authentication_user_id_provider_key; + +CREATE UNIQUE INDEX IF NOT EXISTS oauth_authentication_unique_user_id_provider_idx ON oauth_authentication (user_id, provider); COMMIT; \ No newline at end of file diff --git a/scripts/helm/db/init_dbs/postgresql/init_schema.sql b/scripts/helm/db/init_dbs/postgresql/init_schema.sql index 00588d0f5..94bfa04e2 100644 --- a/scripts/helm/db/init_dbs/postgresql/init_schema.sql +++ b/scripts/helm/db/init_dbs/postgresql/init_schema.sql @@ -165,9 +165,9 @@ $$ user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE, provider oauth_provider NOT NULL, provider_user_id text NOT NULL, - token text NOT NULL, - UNIQUE (user_id, provider) + token text NOT NULL ); + CREATE UNIQUE INDEX oauth_authentication_unique_user_id_provider_idx ON oauth_authentication(user_id,provider); -- --- projects.sql ---