Skip to content

Commit

Permalink
sql/postgres: reduce usage of stubs and separate oss/ent builds
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Sep 24, 2024
1 parent 52a70f5 commit 3bdb9b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sql/postgres/diff_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ func (*diff) ReferenceChanged(from, to schema.ReferenceOption) bool {
return from != to
}

// ForeignKeyAttrChanged reports if any of the foreign-key attributes were changed.
func (*diff) ForeignKeyAttrChanged(_, _ []schema.Attr) bool {
return false
}

// DiffOptions defines PostgreSQL specific schema diffing process.
type DiffOptions struct {
ConcurrentIndex struct {
Expand Down
2 changes: 2 additions & 0 deletions sql/postgres/sqlspec.go → sql/postgres/sqlspec_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.

//go:build !ent

package postgres

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.

//go:build !ent

package postgres

import (
Expand Down

0 comments on commit 3bdb9b5

Please sign in to comment.