diff --git a/backend/python/plugins/azuredevops/azuredevops/migrations.py b/backend/python/plugins/azuredevops/azuredevops/migrations.py index 98fd3b245de..4681f8d9021 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. @@ -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 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))