VERY BREAKING: Rename data and operations schemas#353
Conversation
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
…tion) Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
There was a problem hiding this comment.
Bandit found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
| def get_user_repos(connection): | ||
|
|
||
| return connection.execute(s.text("""SELECT * FROM "augur_operations"."user_repos";""")).fetchall() | ||
| return connection.execute(s.text("""SELECT * FROM "collection_operations"."user_repos";""")).fetchall() |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
| connection.execute("""DELETE FROM augur_operations.config""") | ||
| connection.execute("""DELETE FROM collection_operations.config""") | ||
|
|
||
| def test_get_config_key_with_none_specified(key_handler, test_db_engine): |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'key_handler' from outer scope (line 22) (redefined-outer-name)
| @@ -9,11 +9,11 @@ | |||
| @pytest.fixture | |||
| def set_up_repo_groups(database_connection): | |||
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'database_connection' from outer scope (line 2) (redefined-outer-name)
| def set_up_repo_groups(database_connection): | ||
|
|
||
| df = pd.read_sql(s.sql.text("SELECT repo_group_id FROM augur_data.repo_groups"), database_connection) | ||
| df = pd.read_sql(s.sql.text("SELECT repo_group_id FROM collection_data.repo_groups"), database_connection) |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
| df = pd.read_sql(s.sql.text("SELECT repo_group_id FROM collection_data.repo_groups"), database_connection) | ||
| repo_group_IDs = df['repo_group_id'].values.tolist() | ||
|
|
||
| insert_repo_group_sql = s.sql.text(""" |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
|
|
||
| repo_group_IDs = [group[0] for group in df.fetchall()] | ||
|
|
||
| insertSQL = s.sql.text(""" |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
| @@ -12,7 +12,7 @@ def poll_database_connection(database_string): | |||
| print("Attempting to create db engine") | |||
|
|
|||
| db = s.create_engine(database_string, poolclass=s.pool.NullPool, | |||
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
| @@ -12,7 +12,7 @@ def poll_database_connection(database_string): | |||
| print("Attempting to create db engine") | |||
|
|
|||
| db = s.create_engine(database_string, poolclass=s.pool.NullPool, | |||
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
| self.db_schema = 'collectoss_data' | ||
| self.helper_schema = 'collection_operations' | ||
|
|
||
| self.helper_db = s.create_engine(DB_STR, poolclass=s.pool.NullPool, |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
| self.db_schema = 'collectoss_data' | ||
| self.helper_schema = 'collection_operations' | ||
|
|
||
| self.helper_db = s.create_engine(DB_STR, poolclass=s.pool.NullPool, |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
E0602: Undefined variable 's' (undefined-variable)
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Description
This PR renames the two core schemas CollectOSS uses
augur_data -> collection_data
augur_operations -> collection_operations
This change will be breaking for any downstream uses of the old CollectOSS schema names
The database migration included here is just an ALTER SCHEMA query and some small adjustments to existing schema comments - it is fully/losslessly reversible in case it is found to cause issues
This PR fixes #324
Notes for Reviewers
Signed commits