Skip to content

Commit baf8715

Browse files
committed
add concepting to comments
1 parent 4438187 commit baf8715

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

lib/interface/migratorInterface.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22
* The migrator interface provides the ability to handle all abilities which
33
* are needed to successfully modify the DD of your tables.
44
* This includes all DDL methods provided by SQL naturally.
5+
*
6+
* Considering the zero downtime deployment we are handling migrations like
7+
* the following:
8+
*
9+
* ## Data manipulation, the flow:
10+
*
11+
* *) The very first step is always a full dump, for the sake of security
12+
*
13+
* - all operations that are deleting a currently existing column, e.g. renaming a column:
14+
* - 1. duplicate the column
15+
* - if renamed:
16+
* - 1. create a trigger to update both columns
17+
* - 2. disable/delete trigger after successful deployment
18+
* - if deleted:
19+
* - 1. apply steps from the renaming process
20+
* - 2. create a backup of this column (+PK)/table and delete it afterwards (after the successful deployment)
21+
* - all operations that modify content
22+
* - 1. Retrieve data to be applied
23+
* - 2. Extract PKs of to be updated rows
24+
* - 3. Create backup of to be updated rows
25+
* - 4. Apply changes
526
*/
627

728
function dummy() {

0 commit comments

Comments
 (0)