on main help sign in
Explain the new concept at the top of the README

This allows people new to the project to understand how Reshape works before getting into the technical detail of setting it up and using it (which they may or may not want to do just yet).

commitb3ead8b2e2f52e4f5dd989383e5d3bdd108af14a authorBarry Woolgar <barry@storm-consultancy.com> dateThu 13 Jan 2022, 10:36 (5 years ago) parent9cd9bd3
1 file changed+13−12
README.md+13−12
README.md+13−12
@@ -8,6 +8,7 @@ Reshape is designed for Postgres 12 and later.
88
99*Note: Reshape is **experimental** and should not be used in production. It can (and probably will) destroy your data and break your application.*
1010
11+- [How it works](#how-it-works)
1112- [Getting started](#getting-started)
1213 - [Installation](#installation)
1314 - [Creating your first migration](#creating-your-first-migration)
@@ -33,9 +34,19 @@ Reshape is designed for Postgres 12 and later.
3334 - [`reshape abort`](#reshape-abort)
3435 - [`reshape generate-schema-query`](#reshape-generate-schema-query)
3536 - [Connection options](#connection-options)
36−- [How it works](#how-it-works)
3737- [License](#license)
3838
39+
40+## How it works
41+
42+Reshape works by creating views that encapsulate the underlying tables, which your application will interact with. During a migration, Reshape will automatically create a new set of views and set up triggers to translate inserts and updates between the old and new schema. This means that every deployment is a three-phase process:
43+
44+1. **Start migration** (`reshape migrate`): Sets up views and triggers to ensure both the new and old schema are usable at the same time.
45+2. **Roll out application**: Your application can be gradually rolled out without downtime. The existing deployment will continue using the old schema whilst the new deployment uses the new schema.
46+3. **Complete migration** (`reshape complete`): Removes the old schema and any intermediate data and triggers.
47+
48+If the application deployment fails, you should run `reshape abort` which will roll back any changes made by `reshape migrate` without losing data.
49+
3950## Getting started
4051
4152### Installation
@@ -460,16 +471,6 @@ The options below can be used with all commands that communicate with Postgres.
460471| `--username` | `postgres` | Postgres username |
461472| `--password` | `postgres` | Postgres password |
462473
463−## How it works
464−
465−Reshape works by creating views that encapsulate the underlying tables, which your application will interact with. During a migration, Reshape will automatically create a new set of views and set up triggers to translate inserts and updates between the old and new schema. This means that every deployment is a three-phase process:
466−
467−1. **Start migration** (`reshape migrate`): Sets up views and triggers to ensure both the new and old schema are usable at the same time.
468−2. **Roll out application**: Your application can be gradually rolled out without downtime. The existing deployment will continue using the old schema whilst the new deployment uses the new schema.
469−3. **Complete migration** (`reshape complete`): Removes the old schema and any intermediate data and triggers.
470−
471−If the application deployment fails, you should run `reshape abort` which will roll back any changes made by `reshape migrate` without losing data.
472−
473474## License
474475
475−Reshape is released under the [MIT license](https://choosealicense.com/licenses/mit/).
476+Reshape is released under the [MIT license](https://choosealicense.com/licenses/mit/).