From aa0af8e37d51939423efcb740ac8c8bec345c6d2 Mon Sep 17 00:00:00 2001 From: Lynwee Hou Date: Fri, 13 Oct 2023 12:58:27 +0800 Subject: [PATCH 1/2] docs(azure): fix some grammar mistakes --- backend/python/plugins/azuredevops/azuredevops/migrations.py | 2 +- backend/python/pydevlake/pydevlake/migration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/python/plugins/azuredevops/azuredevops/migrations.py b/backend/python/plugins/azuredevops/azuredevops/migrations.py index 98fd3b245de..3adab8529a9 100644 --- a/backend/python/plugins/azuredevops/azuredevops/migrations.py +++ b/backend/python/plugins/azuredevops/azuredevops/migrations.py @@ -138,7 +138,7 @@ class JobResult(Enum): @migration(20230524181430) def add_build_id_as_job_primary_key(b: MigrationScriptBuilder): - # NOTE: We can't add a column to the primary key of an existing table + # NOTE: We can't add a column to the primary key of an existing table, # so we have to drop the primary key constraint first, # which is done differently in MySQL and PostgreSQL, # and then add the new composite primary key. diff --git a/backend/python/pydevlake/pydevlake/migration.py b/backend/python/pydevlake/pydevlake/migration.py index e4cd1f37d1c..661188c8746 100644 --- a/backend/python/pydevlake/pydevlake/migration.py +++ b/backend/python/pydevlake/pydevlake/migration.py @@ -104,7 +104,7 @@ def add_column(self, table: str, column: str, type: str): def drop_column(self, table: str, column: str): """ - Drops a column from a table if it exist. + Drops a column from a table if it exists. """ self.operations.append(DropColumn(table=table, column=column)) From 17db78971d2c8fd4cf5601a496494e044d2732fd Mon Sep 17 00:00:00 2001 From: Lynwee Hou Date: Fri, 13 Oct 2023 13:06:50 +0800 Subject: [PATCH 2/2] fix(azure): add missing fields for tool layer --- .../plugins/azuredevops/azuredevops/migrations.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/python/plugins/azuredevops/azuredevops/migrations.py b/backend/python/plugins/azuredevops/azuredevops/migrations.py index 3adab8529a9..4681f8d9021 100644 --- a/backend/python/plugins/azuredevops/azuredevops/migrations.py +++ b/backend/python/plugins/azuredevops/azuredevops/migrations.py @@ -175,3 +175,13 @@ def rename_starttime_and_finishtime_for_job(b: MigrationScriptBuilder): def add_missing_migrations_0_17_to_0_18(b: MigrationScriptBuilder): b.rename_column('_tool_azuredevops_gitrepositories', 'transformation_rule_id', 'scope_config_id') b.add_column('_tool_azuredevops_gitrepositories', 'provider', 'varchar(255)') + + +@migration(20231013130200, name="add missing field in _tool_azuredevops_gitrepositoryconfigs") +def add_missing_field_in_tool_azuredevops_gitrepositoryconfigs(b: MigrationScriptBuilder): + b.add_column('_tool_azuredevops_gitrepositoryconfigs', 'connection_id', 'bigint') + + +@migration(20231013130201, name="add missing field in _tool_azuredevops_gitrepositories") +def add_missing_field_in_tool_azuredevops_gitrepositories(b: MigrationScriptBuilder): + b.add_column('_tool_azuredevops_gitrepositories', 'scope_config_id', 'bigint')