Skip to content

Commit 4085c8e

Browse files
author
Oleksandr Bazarnov
committed
changed the naming structure for the migrations
1 parent b912e82 commit 4085c8e

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from airbyte_cdk.sources.declarative.migrations.manifest.migrations import *

airbyte_cdk/sources/declarative/migrations/manifest/migrations/1_v6_45_2_http_requester_path_to_url.py renamed to airbyte_cdk/sources/declarative/migrations/manifest/migrations/http_requester_path_to_url_v6_45_2__1.py

File renamed without changes.

airbyte_cdk/sources/declarative/migrations/manifest/migrations/0_v6_45_2_http_requester_url_base_to_url.py renamed to airbyte_cdk/sources/declarative/migrations/manifest/migrations/http_requester_url_base_to_url_v6_45_2__0.py

File renamed without changes.

airbyte_cdk/sources/declarative/migrations/manifest/migrations_registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818

1919
def _migration_order_key(cls: object) -> int:
20-
# Extract the migration order from the module name, e.g., 0_v6_45_2_http_requester_url_base_to_url_migration
21-
# The order is the integer at the start of the module name, before the first underscore
20+
# Extract the migration order from the module name, e.g., http_requester_url_base_to_url_v6_45_2__0
21+
# The order is the integer after the double underscore at the end of the module name
2222
module_name = cls.__module__.split(".")[-1]
23-
match = re.match(r"(\d+)_", module_name)
23+
match = re.search(r"__(\d+)$", module_name)
2424
return int(match.group(1)) if match else 0
2525

2626

0 commit comments

Comments
 (0)