Skip to content

Commit 0463c1c

Browse files
committed
Migration tutorial draft
1 parent 377c0d5 commit 0463c1c

File tree

3 files changed

+16
-31
lines changed

3 files changed

+16
-31
lines changed

doc/platform/ddl_dml/performing_migrations_tt.rst renamed to doc/platform/ddl_dml/centralized_migrations_tt.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
.. _centralized_migrations_tt:
22

3-
Centralized migration management with tt
4-
========================================
3+
Centralized migrations with tt
4+
==============================
55

66
**Example on GitHub:** `migrations <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/migrations>`_
77

88
In this tutorial, you learn to use the centralized migration management mechanism
99
implemented in the Enterprise Edition of the :ref:`tt <tt-cli>` utility.
1010

11+
See also:
12+
13+
- :ref:`tt migrations <tt-migrations>` reference to see the full list of command-line options.
14+
- :ref:`tcm_cluster_migrations` to learn about managing migrations from |tcm_full_name|.
15+
1116
.. _centralized_migrations_tt_prereq:
1217

1318
Prerequisites
@@ -221,8 +226,8 @@ a cluster user's credentials:
221226

222227
.. code-block:: console
223228
224-
tt migrations apply http://app_user:config_pass@localhost:2379/myapp \
225-
--tarantool-username=client --tarantool-password=secret
229+
$ tt migrations apply http://app_user:config_pass@localhost:2379/myapp \
230+
--tarantool-username=client --tarantool-password=secret
226231
227232
.. important::
228233

doc/platform/ddl_dml/migrations.rst

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,6 @@
33
Migrations
44
==========
55

6-
TBD: rewrite
7-
8-
- what is migration: examples изменение + первоначальное создание
9-
- ce approach ?
10-
- ee approach: centralized migration(s?) management
11-
- prereq: etcd, 3.x ee cluster w/etcd, tt-ee 2.4.0 || tcm,
12-
tarantool user with ~admin permissions
13-
advertise url required?
14-
- way to manage: tt and tcm (check diff implementation)
15-
- writing migrations:
16-
examples: create space (if_not_exists?), add index (with shard key), add index existing space,
17-
space upgrade: wait or just run in bg
18-
19-
- general workflow + status
20-
- troubleshooting?
21-
22-
23-
24-
25-
266
**Migration** refers to any change in a data schema: adding or removing a field,
277
creating or dropping an index, changing a field format, an so on. Space creation
288
is also a schema migration. You can use this fact to track the evolution of your
@@ -129,7 +109,6 @@ and the database schema is updated.
129109
However, this method may not work for everyone.
130110
You may not be able to restart Tarantool or update the code using the hot-reload mechanism.
131111

132-
133112
**Method 2**: the :ref:`tt <tt-cli>` utility
134113

135114
Connect to the necessary instance using ``tt connect``.
@@ -177,15 +156,15 @@ The centralized migration management mechanism is implemented in the Enterprise
177156
version of the :ref:`tt <tt-cli>` utility and in :ref:`tcm`.
178157

179158
To learn how to manage migrations in Tarantool EE clusters from the command line,
180-
see :ref:`performing_migrations_tt`. To learn how to use the mechanism from the |tcm|
159+
see :ref:`centralized_migrations_tt`. To learn how to use the mechanism from the |tcm|
181160
web interface, see the :ref:`tcm_migrations` |tcm| documentation page.
182161

183162
The ``tt`` implementation of the mechanism additionally includes commands for
184163
troubleshooting migration issues. :ref:`troubleshooting_migrations_tt`.
185164

186-
187165
.. toctree::
166+
:maxdepth: 1
188167

189168
space_upgrade
190-
performing_migrations_tt
169+
centralized_migrations_tt
191170
troubleshooting_migrations_tt

doc/tooling/tt_cli/migrations.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _tt-migrations:
22

3-
Performing migrations
4-
=====================
3+
Managing centralized migrations
4+
===============================
55

66
.. admonition:: Enterprise Edition
77
:class: fact
@@ -12,7 +12,8 @@ Performing migrations
1212
1313
$ tt migrations COMMAND [COMMAND_OPTION ...]
1414
15-
``tt migrations`` manages :ref:`migrations <migrations>` in a Tarantool EE cluster.
15+
``tt migrations`` manages :ref:`centralized migrations <centralized_migrations_tt>` in a Tarantool EE cluster.
16+
See :ref:`centralized_migrations_tt` for a detailed guide on using centralized migrations.
1617

1718
.. important::
1819

0 commit comments

Comments
 (0)