Skip to content

Commit be01ca2

Browse files
committed
📝 update README.rst
1 parent ba50872 commit be01ca2

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

docs/README.rst

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,54 @@
11
Usage
22
-----
33

4-
Transfer SQLite to MySQL using the provided CLI options.
4+
The command line options for the ``sqlite3mysql`` tool are as follows:
5+
6+
.. code-block:: bash
7+
8+
sqlite3mysql [OPTIONS]
59
610
Options
711
^^^^^^^
812

9-
SQLite Options
10-
~~~~~~~~~~~~~~
13+
Required Options
14+
""""""""""""""""
1115

1216
- ``-f, --sqlite-file PATH``: SQLite3 database file [required]
17+
- ``-d, --mysql-database TEXT``: MySQL database name [required]
18+
- ``-u, --mysql-user TEXT``: MySQL user [required]
19+
20+
Password Options
21+
""""""""""""""""
22+
23+
- ``-p, --prompt-mysql-password``: Prompt for MySQL password
24+
- ``--mysql-password TEXT``: MySQL password
25+
26+
Table Options
27+
""""""""""""""
28+
1329
- ``-t, --sqlite-tables TUPLE``: Transfer only these specific tables (space separated table names). Implies ``--without-foreign-keys`` which inhibits the transfer of foreign keys.
1430
- ``-X, --without-foreign-keys``: Do not transfer foreign keys.
1531
- ``-W, --ignore-duplicate-keys``: Ignore duplicate keys. The default behavior is to create new ones with a numerical suffix, e.g. 'existing_key' -> 'existing_key_1'
32+
- ``-E, --mysql-truncate-tables``: Truncates existing tables before inserting data.
1633

17-
MySQL Options
18-
~~~~~~~~~~~~~
34+
Transfer Options
35+
""""""""""""""""
36+
37+
- ``-i, --mysql-insert-method [UPDATE|IGNORE|DEFAULT]``: MySQL insert method. DEFAULT will throw errors when encountering duplicate records; UPDATE will update existing rows; IGNORE will ignore insert errors. Defaults to IGNORE.
38+
- ``--with-rowid``: Transfer rowid columns.
39+
- ``-c, --chunk INTEGER``: Chunk reading/writing SQL records
40+
41+
Connection Options
42+
""""""""""""""""""
1943

20-
- ``-d, --mysql-database TEXT``: MySQL database name [required]
21-
- ``-u, --mysql-user TEXT``: MySQL user [required]
22-
- ``-p, --prompt-mysql-password``: Prompt for MySQL password
23-
- ``--mysql-password TEXT``: MySQL password
2444
- ``-h, --mysql-host TEXT``: MySQL host. Defaults to localhost.
2545
- ``-P, --mysql-port INTEGER``: MySQL port. Defaults to 3306.
2646
- ``-S, --skip-ssl``: Disable MySQL connection encryption.
27-
- ``-i, --mysql-insert-method [UPDATE|IGNORE|DEFAULT]``: MySQL insert method. DEFAULT will throw errors when encountering duplicate records; UPDATE will update existing rows; IGNORE will ignore insert errors. Defaults to IGNORE.
28-
- ``-E, --mysql-truncate-tables``: Truncates existing tables before inserting data.
29-
- ``--mysql-integer-type TEXT``: MySQL default integer field type. Defaults to INT(11).
30-
- ``--mysql-string-type TEXT``: MySQL default string field type. Defaults to VARCHAR(255).
31-
- ``--mysql-text-type [MEDIUMTEXT|TEXT|TINYTEXT|LONGTEXT]``: MySQL default text field type. Defaults to TEXT.
32-
- ``--mysql-charset TEXT``: MySQL database and table character set [default: utf8mb4]
33-
- ``--mysql-collation TEXT``: MySQL database and table collation
3447

3548
Other Options
36-
~~~~~~~~~~~~~
49+
""""""""""""""
3750

3851
- ``-T, --use-fulltext``: Use FULLTEXT indexes on TEXT columns. Will throw an error if your MySQL version does not support InnoDB FULLTEXT indexes!
39-
- ``--with-rowid``: Transfer rowid columns.
40-
- ``-c, --chunk INTEGER``: Chunk reading/writing SQL records
4152
- ``-l, --log-file PATH``: Log file
4253
- ``-q, --quiet``: Quiet. Display only errors.
4354
- ``--debug``: Debug mode. Will throw exceptions.

0 commit comments

Comments
 (0)