Commit ef1705b
Check table exists in current search path
* If a `migrations` table did exist in a schema outside of the
search path, `doesTableExist` would return true but the migration
would then fail with 'relation "migrations" does not exist'
* See https://dba.stackexchange.com/a/86098 for the details on the query
* This new query makes it possible to have one `migrations` table per
schema
Issue #92 Migrations can't be run on multiple schemas in the same database
Co-authored-by: Remi Koenig <r.koenig@agricool.co>1 parent dbfc5cc commit ef1705b
File tree
4 files changed
+50
-8
lines changed- src
- __tests__
- fixtures
- multiple-schemas-2
- multiple-schemas
4 files changed
+50
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
78 | 107 | | |
79 | 108 | | |
80 | 109 | | |
| |||
720 | 749 | | |
721 | 750 | | |
722 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
204 | 207 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
212 | 211 | | |
213 | 212 | | |
0 commit comments