Skip to content

Commit

Permalink
table init changed
Browse files Browse the repository at this point in the history
table init changed
  • Loading branch information
sean-k1 committed Sep 16, 2023
1 parent aa1ecdf commit 6aa3872
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pymysqlreplication/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@


class Table(object):
def __init__(self, table_id, schema, table, columns, primary_key=None):
self.column_name_flag = False
def __init__(
self, table_id, schema, table, columns, primary_key=None, column_name_flag=False
):
if primary_key is None:
primary_key = [c.data["name"] for c in columns if c.data["is_primary"]]
if len(primary_key) == 0:
Expand All @@ -20,6 +21,7 @@ def __init__(self, table_id, schema, table, columns, primary_key=None):
"table": table,
"columns": columns,
"primary_key": primary_key,
"column_name_flag": column_name_flag,
}
)

Expand Down

0 comments on commit 6aa3872

Please sign in to comment.