You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,32 @@ async function() {
75
75
}
76
76
```
77
77
78
+
### Config
79
+
80
+
#### `logger`
81
+
82
+
This will be used for all logging from `postgres-migrations`. The function will be called passing a
83
+
string argument with each call.
84
+
85
+
#### `dryRun`
86
+
87
+
Setting `dryRun` to `true` will log the filenames and SQL of all transactions to be run, without running them. It validates that the file names are the appropriate format, but it does not perform any validation of the migrations themselves so they may still fail after running.
88
+
89
+
The logs look like this:
90
+
91
+
```
92
+
Migrations to run:
93
+
1_first_migration.sql
94
+
2_second_migration.js
95
+
96
+
CREATE TABLE first_migration_table (
97
+
id integer
98
+
);
99
+
100
+
ALTER TABLE first_migration_table
101
+
ADD second_migration_column integer;
102
+
```
103
+
78
104
### Validating migration files
79
105
80
106
Occasionally, if two people are working on the same codebase independently, they might both create a migration at the same time. For example, `5_add-table.sql` and `5_add-column.sql`. If these both get pushed, there will be a conflict.
0 commit comments