Commit 1d81596
committed
Switch PostgreSQL Database#indexes :include_invalid option to :invalid
The :include_invalid support has been switched to invalid: :include.
This adds support for requesting only invalid indexes using
invalid: :only. I probably should have done something similar when
adding support for partial indexes. This doesn't change the
:include_partial option to :partial (that wouldn't be backwards
compatible), though I'm willing to add support for partial: :include
and partial: :only if anyone wants that ability.
This removes the :include_invalid spec instead of modifying it. The
spec only worked correctly if the user running the specs is the
database superuser. That may be true in CI, but it's not recommended
for standard testing during development. I'm not sure how to force
an invalid index in all supported PostgreSQL versions, and since
this updates the add_index :only option specs to test the indexes
:invalid option, I don't think the separate spec is needed.
Since it's simple, add a mock adpater spec for use of the add_index
:only option.1 parent fb92764 commit 1d81596
File tree
5 files changed
+44
-17
lines changed- doc
- spec
- adapters
- core
5 files changed
+44
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
559 | | - | |
560 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
561 | 563 | | |
562 | 564 | | |
563 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
673 | 678 | | |
674 | 679 | | |
675 | 680 | | |
676 | 681 | | |
677 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
678 | 691 | | |
679 | 692 | | |
680 | 693 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1576 | 1576 | | |
1577 | 1577 | | |
1578 | 1578 | | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
1583 | | - | |
1584 | | - | |
1585 | | - | |
1586 | 1579 | | |
1587 | 1580 | | |
1588 | 1581 | | |
| |||
1642 | 1635 | | |
1643 | 1636 | | |
1644 | 1637 | | |
1645 | | - | |
| 1638 | + | |
1646 | 1639 | | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1651 | 1652 | | |
1652 | 1653 | | |
1653 | 1654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
630 | 635 | | |
631 | 636 | | |
632 | 637 | | |
| |||
0 commit comments