Commit 1ad8c54
committed
Add PostgreSQL index access method reflection support
This adds the ability to reflect PostgreSQL index access methods
(gin, gist, spgist, brin, hash) when describing indexes.
Changes:
- Add `accessMethod` property to Index class with constants for
PostgreSQL access methods (GIN, GIST, SPGIST, BRIN, HASH)
- Update describeIndexQuery() to join pg_am and fetch amname
- Update describeIndexes() and convertIndexDescription() to include
accessMethod in result for non-btree indexes
- Update indexSql() to generate USING clause for non-btree indexes
This enables migrations to properly reflect and regenerate indexes
that use specialized PostgreSQL access methods.
Refs cakephp/migrations#10531 parent cef6ba0 commit 1ad8c54
2 files changed
+64
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| |||
48 | 59 | | |
49 | 60 | | |
50 | 61 | | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| 72 | + | |
60 | 73 | | |
61 | 74 | | |
62 | 75 | | |
| |||
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
234 | 273 | | |
235 | 274 | | |
236 | 275 | | |
| |||
241 | 280 | | |
242 | 281 | | |
243 | 282 | | |
244 | | - | |
| 283 | + | |
245 | 284 | | |
246 | 285 | | |
247 | 286 | | |
| |||
268 | 307 | | |
269 | 308 | | |
270 | 309 | | |
| 310 | + | |
271 | 311 | | |
272 | 312 | | |
273 | 313 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| 385 | + | |
384 | 386 | | |
385 | 387 | | |
386 | 388 | | |
| |||
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
426 | 433 | | |
427 | 434 | | |
428 | 435 | | |
| |||
458 | 465 | | |
459 | 466 | | |
460 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
461 | 473 | | |
462 | 474 | | |
463 | 475 | | |
| |||
917 | 929 | | |
918 | 930 | | |
919 | 931 | | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
920 | 940 | | |
921 | 941 | | |
922 | 942 | | |
| |||
927 | 947 | | |
928 | 948 | | |
929 | 949 | | |
930 | | - | |
| 950 | + | |
931 | 951 | | |
932 | 952 | | |
| 953 | + | |
933 | 954 | | |
934 | 955 | | |
935 | 956 | | |
| |||
0 commit comments