This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 374453008 Lw fix azure tables (#6240)
374453008 is described below

commit 3744530088a5117b841714a1b173bc424ae76147
Author: Lynwee <[email protected]>
AuthorDate: Fri Oct 13 13:30:04 2023 +0800

    Lw fix azure tables (#6240)
    
    * docs(azure): fix some grammar mistakes
    
    * fix(azure): add missing fields for tool layer
---
 backend/python/plugins/azuredevops/azuredevops/migrations.py | 12 +++++++++++-
 backend/python/pydevlake/pydevlake/migration.py              |  2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/backend/python/plugins/azuredevops/azuredevops/migrations.py 
b/backend/python/plugins/azuredevops/azuredevops/migrations.py
index 98fd3b245..4681f8d90 100644
--- a/backend/python/plugins/azuredevops/azuredevops/migrations.py
+++ b/backend/python/plugins/azuredevops/azuredevops/migrations.py
@@ -138,7 +138,7 @@ def init_schemas(b: MigrationScriptBuilder):
 
 @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.
@@ -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')
diff --git a/backend/python/pydevlake/pydevlake/migration.py 
b/backend/python/pydevlake/pydevlake/migration.py
index e4cd1f37d..661188c87 100644
--- a/backend/python/pydevlake/pydevlake/migration.py
+++ b/backend/python/pydevlake/pydevlake/migration.py
@@ -104,7 +104,7 @@ class MigrationScriptBuilder:
 
     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))
 

Reply via email to