Skip to content

Commit

Permalink
Fix warning for migration (#1592)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Jun 27, 2024
1 parent 0fa5866 commit 2a99e68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _rename_sequence(m, new_table_name, table):
if id_column is not None and id_column.server_default is not None:
seq = id_column.server_default.arg.text
# format is 'nextval(\'org_id_seq\'::regclass)'
seq_name = re.search("nextval\(\'(.*)\'::regclass", seq).group(1)
seq_name = re.search(r"nextval\(\'(.*)\'::regclass", seq).group(1)
new_seq_name = seq_name.replace(table, new_table_name, 1)
if seq_name != new_seq_name:
print(f'\t<<<<<<<<<Renaming PK : {seq_name} to {new_seq_name} of table {table}')
Expand Down

0 comments on commit 2a99e68

Please sign in to comment.