Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dialect/pgdialect/sqltype.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (d *Dialect) CompareType(col1, col2 sqlschema.Column) bool {
}

// checkVarcharLen returns true if columns have the same VarcharLen, or,
// if one specifies no VarcharLen and the other one has the default lenght for pgdialect.
// if one specifies no VarcharLen and the other one has the default length for pgdialect.
// We assume that the types are otherwise equivalent and that any non-character column
// would have VarcharLen == 0;
func checkVarcharLen(col1, col2 sqlschema.Column, defaultLen int) bool {
Expand Down
2 changes: 1 addition & 1 deletion extra/bunexp/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var _ (bun.ConnResolver) = (*ReadWriteConnResolver)(nil)

// TODO:
// - make monitoring interval configurable
// - make ping timeout configutable
// - make ping timeout configurable
// - allow adding read/write replicas for multi-master replication
type ReadWriteConnResolver struct {
rw replicas // for read-write queries
Expand Down
4 changes: 2 additions & 2 deletions internal/dbtest/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ func newAutoMigratorOrSkip(tb testing.TB, db *bun.DB, opts ...migrate.AutoMigrat
}

// inspectDbOrSkip returns a function to inspect the current state of the database.
// The test will be *skipped* if the current dialect doesn't support database inpection
// The test will be *skipped* if the current dialect doesn't support database inspection
// and fail if the inspector cannot successfully retrieve database state.
func inspectDbOrSkip(tb testing.TB, db *bun.DB, options ...sqlschema.InspectorOption) func(context.Context) sqlschema.BaseDatabase {
tb.Helper()

// By appending options to default options we make sure they can be overriden.
// By appending options to default options we make sure they can be overridden.
// E.g. passing sqlschema.WithSchemaName("custom") sets migration schema to "custom".
defaultOptions := []sqlschema.InspectorOption{
sqlschema.WithSchemaName(db.Dialect().DefaultSchema()),
Expand Down
2 changes: 1 addition & 1 deletion migrate/auto.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func WithExcludeTable(tables ...string) AutoMigratorOption {
}
}

// WithExcludeForeignKeys tells AutoMigrator to exclude a foreign key constaint
// WithExcludeForeignKeys tells AutoMigrator to exclude a foreign key constraint
// from the migration scope. This prevents AutoMigrator from dropping foreign keys
// that are defined manually via CreateTableQuery.ForeignKey().
func WithExcludeForeignKeys(fks ...sqlschema.ForeignKey) AutoMigratorOption {
Expand Down
2 changes: 1 addition & 1 deletion migrate/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (op *DropUniqueConstraintOp) GetReverse() Operation {

// ChangeColumnTypeOp set a new data type for the column.
// The two types should be such that the data can be auto-casted from one to another.
// E.g. reducing VARCHAR lenght is not possible in most dialects.
// E.g. reducing VARCHAR length is not possible in most dialects.
// AutoMigrator does not enforce or validate these rules.
type ChangeColumnTypeOp struct {
TableName string
Expand Down
2 changes: 1 addition & 1 deletion migrate/sqlschema/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (c *Columns) Split() []string {
return strings.Split(c.String(), ",")
}

// ContainsColumns checks that columns in "other" are a subset of current colums.
// ContainsColumns checks that columns in "other" are a subset of current columns.
func (c *Columns) ContainsColumns(other Columns) bool {
columns := c.Split()
Outer:
Expand Down
2 changes: 1 addition & 1 deletion migrate/sqlschema/inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type InspectorDialect interface {

// Inspector returns a new instance of Inspector for the dialect.
// Dialects MAY set their default InspectorConfig values in constructor
// but MUST apply InspectorOptions to ensure they can be overriden.
// but MUST apply InspectorOptions to ensure they can be overridden.
//
// Use ApplyInspectorOptions to reduce boilerplate.
NewInspector(db *bun.DB, options ...InspectorOption) Inspector
Expand Down
2 changes: 1 addition & 1 deletion migrate/sqlschema/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewMigrator(db *bun.DB, schemaName string) (Migrator, error) {
}, nil
}

// BaseMigrator can be embeded by dialect's Migrator implementations to re-use some of the existing bun queries.
// BaseMigrator can be embedded by dialect's Migrator implementations to re-use some of the existing bun queries.
type BaseMigrator struct {
db *bun.DB
}
Expand Down
Loading