Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6fd2a16

Browse files
committed
♻️ reorder CLI parameters
1 parent 5205b36 commit 6fd2a16

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎src/mysql_to_sqlite3/cli.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@
6363
"Implies --without-foreign-keys which inhibits the transfer of foreign keys. "
6464
"Can not be used together with --mysql-tables.",
6565
)
66+
@click.option(
67+
"-T",
68+
"--mysql-views-as-tables",
69+
is_flag=True,
70+
help="Materialize MySQL VIEWs as SQLite tables (legacy behavior).",
71+
)
6672
@click.option(
6773
"-L",
6874
"--limit-rows",
@@ -142,12 +148,6 @@
142148
)
143149
@click.option("-l", "--log-file", type=click.Path(), help="Log file")
144150
@click.option("--json-as-text", is_flag=True, help="Transfer JSON columns as TEXT.")
145-
@click.option(
146-
"-T",
147-
"--mysql-views-as-tables",
148-
is_flag=True,
149-
help="Materialize MySQL VIEWs as SQLite tables (legacy behavior).",
150-
)
151151
@click.option(
152152
"-V",
153153
"--vacuum",
@@ -173,6 +173,7 @@ def cli(
173173
mysql_database: str,
174174
mysql_tables: t.Optional[t.Sequence[str]],
175175
exclude_mysql_tables: t.Optional[t.Sequence[str]],
176+
mysql_views_as_tables: bool,
176177
limit_rows: int,
177178
collation: t.Optional[str],
178179
prefix_indices: bool,
@@ -188,7 +189,6 @@ def cli(
188189
chunk: int,
189190
log_file: t.Union[str, "os.PathLike[t.Any]"],
190191
json_as_text: bool,
191-
mysql_views_as_tables: bool,
192192
vacuum: bool,
193193
use_buffered_cursors: bool,
194194
quiet: bool,
@@ -223,6 +223,7 @@ def cli(
223223
mysql_database=mysql_database,
224224
mysql_tables=mysql_tables,
225225
exclude_mysql_tables=exclude_mysql_tables,
226+
views_as_views=not mysql_views_as_tables,
226227
limit_rows=limit_rows,
227228
collation=collation,
228229
prefix_indices=prefix_indices,
@@ -237,7 +238,6 @@ def cli(
237238
mysql_ssl_disabled=skip_ssl,
238239
chunk=chunk,
239240
json_as_text=json_as_text,
240-
views_as_views=not mysql_views_as_tables,
241241
vacuum=vacuum,
242242
buffered=use_buffered_cursors,
243243
log_file=log_file,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /