Skip to content

Commit

Permalink
sql/postgres: add storage params constants (#3342)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m authored Jan 26, 2025
1 parent eaf4727 commit 32861bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sql/postgres/diff_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func indexStorageParams(attrs []schema.Attr) (*IndexStorageParams, bool) {
if !sqlx.Has(attrs, s) {
return nil, false
}
if !s.AutoSummarize && (s.PagesPerRange == 0 || s.PagesPerRange == defaultPagePerRange) {
if !s.AutoSummarize && (s.PagesPerRange == 0 || s.PagesPerRange == defaultPagesPerRange) {
return nil, false
}
return s, true
Expand Down
2 changes: 1 addition & 1 deletion sql/postgres/migrate_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ func (s *state) index(b *sqlx.Builder, idx *schema.Index) error {
if p.AutoSummarize {
parts = append(parts, "autosummarize = true")
}
if p.PagesPerRange != 0 && p.PagesPerRange != defaultPagePerRange {
if p.PagesPerRange != 0 && p.PagesPerRange != defaultPagesPerRange {
parts = append(parts, fmt.Sprintf("pages_per_range = %d", p.PagesPerRange))
}
b.WriteString(strings.Join(parts, ", "))
Expand Down

0 comments on commit 32861bc

Please sign in to comment.