Skip to content

Commit

Permalink
Lw fix azure tables (#6240)
Browse files Browse the repository at this point in the history
* docs(azure): fix some grammar mistakes

* fix(azure): add missing fields for tool layer
  • Loading branch information
d4x1 authored Oct 13, 2023
1 parent 6b358df commit 3744530
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion backend/python/plugins/azuredevops/azuredevops/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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')
2 changes: 1 addition & 1 deletion backend/python/pydevlake/pydevlake/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 3744530

Please sign in to comment.