Skip to content

Commit 3653147

Browse files
fix diff parsing
1 parent dddf565 commit 3653147

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tmp

pg_diff.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class DBChanges(enum.StrEnum):
3737
continue
3838

3939
match current_type:
40-
case DBChanges.ColumnAdded | DBChanges.ColumnDeleted | DBChanges.ColumnChanged:
40+
case DBChanges.ColumnAdded | DBChanges.ColumnDeleted:
4141
column_name = re.match(COLUMN_PATTERN, line)
4242
columns_changes.setdefault(current_type, {}).setdefault(
4343
column_name.group(1),
4444
[],
4545
).append(column_name.group(2))
46-
case DBChanges.TableAdded | DBChanges.TableDeleted | DBChanges.TableChanged:
46+
case DBChanges.TableAdded | DBChanges.TableDeleted:
4747
table_name = re.match(TABLE_PATTERN, line)
4848
if table_name:
4949
tables_changes.setdefault(
@@ -84,3 +84,5 @@ class DBChanges(enum.StrEnum):
8484
for column in columns
8585
],
8686
)
87+
88+
sys.stdout.write("\n")

0 commit comments

Comments
 (0)