Skip to content

Commit

Permalink
✨ add MySQL 8.4 and MariaDB 11.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Jul 27, 2024
1 parent b90d915 commit 08c006f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/mysql_to_sqlite3/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ def cli(
"""Transfer MySQL to SQLite using the provided CLI options."""
click.echo(_copyright_header)
try:
if mysql_collation:
charset_collations: t.Tuple[str, ...] = tuple(

Check warning on line 187 in src/mysql_to_sqlite3/cli.py

View check run for this annotation

Codecov / codecov/patch

src/mysql_to_sqlite3/cli.py#L187

Added line #L187 was not covered by tests
cs.collation for cs in mysql_supported_character_sets(mysql_charset.lower())
)
if mysql_collation not in set(charset_collations):
raise click.ClickException(

Check warning on line 191 in src/mysql_to_sqlite3/cli.py

View check run for this annotation

Codecov / codecov/patch

src/mysql_to_sqlite3/cli.py#L190-L191

Added lines #L190 - L191 were not covered by tests
f"Error: Invalid value for '--collation' of charset '{mysql_charset}': '{mysql_collation}' "
f"""is not one of {"'" + "', '".join(charset_collations) + "'"}."""
)

# check if both mysql_skip_create_table and mysql_skip_transfer_data are True
if without_tables and without_data:
raise click.ClickException(
Expand Down

0 comments on commit 08c006f

Please sign in to comment.