Documentation
¶
Index ¶
Constants ¶
View Source
const ( ObjectTypeNamedSchema = internalschema.ObjectTypeNamedSchema ObjectTypeExtension = internalschema.ObjectTypeExtension ObjectTypeEnum = internalschema.ObjectTypeEnum ObjectTypeTable = internalschema.ObjectTypeTable ObjectTypeIndex = internalschema.ObjectTypeIndex ObjectTypeForeignKeyConstraint = internalschema.ObjectTypeForeignKeyConstraint ObjectTypeSequence = internalschema.ObjectTypeSequence ObjectTypeFunction = internalschema.ObjectTypeFunction ObjectTypeProcedure = internalschema.ObjectTypeProcedure ObjectTypeTrigger = internalschema.ObjectTypeTrigger ObjectTypeCheckConstraint = internalschema.ObjectTypeCheckConstraint ObjectTypePolicy = internalschema.ObjectTypePolicy ObjectTypeReplicaIdentity = internalschema.ObjectTypeReplicaIdentity ObjectTypePartitioning = internalschema.ObjectTypePartitioning )
Variables ¶
View Source
var ( WithIncludeSchemas = internalschema.WithIncludeSchemas WithExcludeSchemas = internalschema.WithExcludeSchemas // AllObjectTypes is the default set used when WithIncludeObjectTypes isn't // passed. AllObjectTypes = internalschema.AllObjectTypes // WithIncludeObjectTypes restricts the schema to the given object types. // Use it when the schema you are diffing against only models a subset of // Postgres, so the classes you don't model aren't seen as objects to drop. WithIncludeObjectTypes = internalschema.WithIncludeObjectTypes )
Functions ¶
func GetSchemaHash ¶
func GetSchemaHash(ctx context.Context, queryable sqldb.Queryable, opts ...GetSchemaOpt) (string, error)
GetSchemaHash hash gets the hash of the target schema. It can be used to compare against the hash in the migration plan to determine if the plan is still valid.
We do not expose the Schema struct yet because it is subject to change, and we do not want folks depending on its API.
Types ¶
type GetSchemaOpt ¶
type GetSchemaOpt = internalschema.GetSchemaOpt
type ObjectType ¶ added in v0.9.0
type ObjectType = internalschema.ObjectType
ObjectType identifies a class of schema object. See WithIncludeObjectTypes.
Click to show internal directories.
Click to hide internal directories.