on main help sign in
Merge pull request #3 from barrywoolgar/patch-1

Explain the new concept at the top of the README

commitd76dbab5ba930d89cd5a2630fa660380f657ea97 authorFabian Lindfors <fabian@flapplabs.se> dateThu 13 Jan 2022, 14:27 (5 years ago) parent9cd9bd3b3ead8b
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/).