Skip to content

Commit

Permalink
Rename options, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed Aug 11, 2018
1 parent 0e3b8b0 commit c9d6b31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 5 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ Run ``xload`` command::

Possible options to both commands:

- ``alias`` - allows you to choose database config from DATABASES, that is used during the execution;
- ``backend`` - importable string, that leads to custom dump backend class.
- ``-a/--alias`` - allows you to choose database config from ``DATABASES``, that is used during the execution;
- ``-b/--backend`` - importable string, that leads to custom dump backend class.

Options for ``xdump`` command:
- ``dump_schema`` - controls if the schema should be included;
- ``dump_data`` - controls if the data should be included.
- ``-s/--dump-schema`` - controls if the schema should be included;
- ``-d/--dump-data`` - controls if the data should be included.

Options for ``xload`` command:
- ``truncate`` - truncate data instead of DB re-creation.
- ``-m/--cleanup-method`` - optionally re-creates DB or truncates the data.

NOTE. If the dump has no schema inside, DB won't be re-created.

Expand All @@ -208,7 +208,6 @@ And usage is:
$ make sync-production TARGET=john@production.com PYTHON=/path/to/python/in/venv
Python support
==============

Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Changed
- ``xdump.sqlite.SQLiteBackend`` now accepts only ``dbname`` and ``verbosity``. `#52`_
- Now Django's ``xload`` command doesn't recreate the DB but provides a non required option ``--cleanup-method`` for
choosing how to clean-up the database before the dump loading. `#53`_
- Django's ``xload`` command options are renamed.
``--dump_data`` -> ``--dump-data`` and ``--dump_schema`` -> ``--dump-schema``.

`0.5.0`_ - 2018-08-02
---------------------
Expand Down
4 changes: 2 additions & 2 deletions xdump/extra/django/xdump/management/commands/xdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ class Command(XDumpCommand):
def add_arguments(self, parser):
super(Command, self).add_arguments(parser)
parser.add_argument(
'-d', '--dump_data',
'-d', '--dump-data',
action='store',
dest='dump_data',
help='Control if the data should be dumped.',
required=False,
default=True,
)
parser.add_argument(
'-s', '--dump_schema',
'-s', '--dump-schema',
action='store',
dest='dump_schema',
help='Control if the schema should be dumped.',
Expand Down

0 comments on commit c9d6b31

Please sign in to comment.