diff --git a/README.md b/README.md index 6d231103..84236bb9 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ The fantastic ORM library for Golang, aims to be developer friendly. -[![go report card](https://goreportcard.com/badge/github.com/jinzhu/gorm "go report card")](https://goreportcard.com/report/github.com/jinzhu/gorm) +[![go report card](https://goreportcard.com/badge/gorm.io/gorm "go report card")](https://goreportcard.com/report/gorm.io/gorm) [![wercker status](https://app.wercker.com/status/8596cace912c9947dd9c8542ecc8cb8b/s/master "wercker status")](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b) [![codecov](https://codecov.io/gh/jinzhu/gorm/branch/master/graph/badge.svg)](https://codecov.io/gh/jinzhu/gorm) [![Join the chat at https://gitter.im/jinzhu/gorm](https://img.shields.io/gitter/room/jinzhu/gorm.svg)](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Open Collective Backer](https://opencollective.com/gorm/tiers/backer/badge.svg?label=backer&color=brightgreen "Open Collective Backer")](https://opencollective.com/gorm) [![Open Collective Sponsor](https://opencollective.com/gorm/tiers/sponsor/badge.svg?label=sponsor&color=brightgreen "Open Collective Sponsor")](https://opencollective.com/gorm) [![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) -[![GoDoc](https://godoc.org/github.com/jinzhu/gorm?status.svg)](https://godoc.org/github.com/jinzhu/gorm) +[![GoDoc](https://godoc.org/gorm.io/gorm?status.svg)](https://godoc.org/gorm.io/gorm) ## Overview @@ -39,3 +39,4 @@ The fantastic ORM library for Golang, aims to be developer friendly. © Jinzhu, 2013~time.Now Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License) + diff --git a/association.go b/association.go index 23e5a82f..928dcf3e 100644 --- a/association.go +++ b/association.go @@ -6,9 +6,9 @@ import ( "reflect" "strings" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + "gorm.io/gorm/utils" ) // Association Mode contains some helper methods to handle relationship things easily. diff --git a/callbacks.go b/callbacks.go index d3cd8e62..c5654c50 100644 --- a/callbacks.go +++ b/callbacks.go @@ -7,9 +7,9 @@ import ( "reflect" "time" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm/logger" + "gorm.io/gorm/schema" + "gorm.io/gorm/utils" ) func initializeCallbacks(db *DB) *callbacks { diff --git a/callbacks/associations.go b/callbacks/associations.go index d19f7339..5ff63cc4 100644 --- a/callbacks/associations.go +++ b/callbacks/associations.go @@ -3,10 +3,10 @@ package callbacks import ( "reflect" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + "gorm.io/gorm/utils" ) func SaveBeforeAssociations(db *gorm.DB) { diff --git a/callbacks/callbacks.go b/callbacks/callbacks.go index 1c1d6ade..f61252d4 100644 --- a/callbacks/callbacks.go +++ b/callbacks/callbacks.go @@ -1,7 +1,7 @@ package callbacks import ( - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) type Config struct { diff --git a/callbacks/create.go b/callbacks/create.go index 0277407e..0b88e263 100644 --- a/callbacks/create.go +++ b/callbacks/create.go @@ -3,9 +3,9 @@ package callbacks import ( "reflect" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) func BeforeCreate(db *gorm.DB) { diff --git a/callbacks/delete.go b/callbacks/delete.go index 451569cf..b8691ff9 100644 --- a/callbacks/delete.go +++ b/callbacks/delete.go @@ -3,9 +3,9 @@ package callbacks import ( "reflect" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) func BeforeDelete(db *gorm.DB) { diff --git a/callbacks/helper.go b/callbacks/helper.go index 818d9c2c..828e025a 100644 --- a/callbacks/helper.go +++ b/callbacks/helper.go @@ -3,8 +3,8 @@ package callbacks import ( "sort" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm" + "gorm.io/gorm/clause" ) // SelectAndOmitColumns get select and omit columns, select -> true, omit -> false diff --git a/callbacks/interface.go b/callbacks/interface.go index 0ef64fcd..ee0044e8 100644 --- a/callbacks/interface.go +++ b/callbacks/interface.go @@ -1,6 +1,6 @@ package callbacks -import "github.com/jinzhu/gorm" +import "gorm.io/gorm" type beforeSaveInterface interface { BeforeSave(*gorm.DB) error diff --git a/callbacks/preload.go b/callbacks/preload.go index 6c763da4..a9907d68 100644 --- a/callbacks/preload.go +++ b/callbacks/preload.go @@ -3,10 +3,10 @@ package callbacks import ( "reflect" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + "gorm.io/gorm/utils" ) func preload(db *gorm.DB, rels []*schema.Relationship, conds []interface{}) { diff --git a/callbacks/query.go b/callbacks/query.go index f7c3271f..b3293576 100644 --- a/callbacks/query.go +++ b/callbacks/query.go @@ -6,9 +6,9 @@ import ( "sort" "strings" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) func Query(db *gorm.DB) { diff --git a/callbacks/raw.go b/callbacks/raw.go index cb0cd6c9..4093a5ab 100644 --- a/callbacks/raw.go +++ b/callbacks/raw.go @@ -1,7 +1,7 @@ package callbacks import ( - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) func RawExec(db *gorm.DB) { diff --git a/callbacks/row.go b/callbacks/row.go index f4ff734c..b25503ff 100644 --- a/callbacks/row.go +++ b/callbacks/row.go @@ -1,7 +1,7 @@ package callbacks import ( - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) func RowQuery(db *gorm.DB) { diff --git a/callbacks/transaction.go b/callbacks/transaction.go index 63015364..430a341d 100644 --- a/callbacks/transaction.go +++ b/callbacks/transaction.go @@ -1,7 +1,7 @@ package callbacks import ( - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) func BeginTransaction(db *gorm.DB) { diff --git a/callbacks/update.go b/callbacks/update.go index a52bd310..9b2e924b 100644 --- a/callbacks/update.go +++ b/callbacks/update.go @@ -4,9 +4,9 @@ import ( "reflect" "sort" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) func SetupUpdateReflectValue(db *gorm.DB) { diff --git a/chainable_api.go b/chainable_api.go index 6fa605c6..b1ae3132 100644 --- a/chainable_api.go +++ b/chainable_api.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm/clause" + "gorm.io/gorm/utils" ) // Model specify the model you would like to run db operations diff --git a/clause/benchmarks_test.go b/clause/benchmarks_test.go index 47001cd1..2faed773 100644 --- a/clause/benchmarks_test.go +++ b/clause/benchmarks_test.go @@ -4,10 +4,10 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + "gorm.io/gorm/tests" ) func BenchmarkSelect(b *testing.B) { diff --git a/clause/clause_test.go b/clause/clause_test.go index 30ea9343..f9d26a4a 100644 --- a/clause/clause_test.go +++ b/clause/clause_test.go @@ -6,10 +6,10 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + "gorm.io/gorm/tests" ) var db, _ = gorm.Open(tests.DummyDialector{}, nil) diff --git a/clause/delete_test.go b/clause/delete_test.go index 2faf8364..a9a659b3 100644 --- a/clause/delete_test.go +++ b/clause/delete_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestDelete(t *testing.T) { diff --git a/clause/expression_test.go b/clause/expression_test.go index e51d189e..4e937650 100644 --- a/clause/expression_test.go +++ b/clause/expression_test.go @@ -5,10 +5,10 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + "gorm.io/gorm/tests" ) func TestExpr(t *testing.T) { diff --git a/clause/from_test.go b/clause/from_test.go index 4b7b0e18..3ebb754c 100644 --- a/clause/from_test.go +++ b/clause/from_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestFrom(t *testing.T) { diff --git a/clause/group_by_test.go b/clause/group_by_test.go index 98aad3eb..589f9613 100644 --- a/clause/group_by_test.go +++ b/clause/group_by_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestGroupBy(t *testing.T) { diff --git a/clause/insert_test.go b/clause/insert_test.go index b1a57803..70810bce 100644 --- a/clause/insert_test.go +++ b/clause/insert_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestInsert(t *testing.T) { diff --git a/clause/limit_test.go b/clause/limit_test.go index 7b76aaf4..80317dc3 100644 --- a/clause/limit_test.go +++ b/clause/limit_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestLimit(t *testing.T) { diff --git a/clause/locking_test.go b/clause/locking_test.go index 6b054404..6f507692 100644 --- a/clause/locking_test.go +++ b/clause/locking_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestFor(t *testing.T) { diff --git a/clause/order_by_test.go b/clause/order_by_test.go index 2c74a322..2ea2d192 100644 --- a/clause/order_by_test.go +++ b/clause/order_by_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestOrderBy(t *testing.T) { diff --git a/clause/returning_test.go b/clause/returning_test.go index e9fed1cb..bd0ecce8 100644 --- a/clause/returning_test.go +++ b/clause/returning_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestReturning(t *testing.T) { diff --git a/clause/select_test.go b/clause/select_test.go index 0863d086..b7296434 100644 --- a/clause/select_test.go +++ b/clause/select_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestSelect(t *testing.T) { diff --git a/clause/set_test.go b/clause/set_test.go index 48131218..dbc1e970 100644 --- a/clause/set_test.go +++ b/clause/set_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestSet(t *testing.T) { diff --git a/clause/update_test.go b/clause/update_test.go index adc48f03..c704bf5e 100644 --- a/clause/update_test.go +++ b/clause/update_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestUpdate(t *testing.T) { diff --git a/clause/values_test.go b/clause/values_test.go index ced4f1e6..9c02c8a5 100644 --- a/clause/values_test.go +++ b/clause/values_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestValues(t *testing.T) { diff --git a/clause/where_test.go b/clause/where_test.go index 450a0c89..894e11f4 100644 --- a/clause/where_test.go +++ b/clause/where_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) func TestWhere(t *testing.T) { diff --git a/dialects/mssql/create.go b/dialects/mssql/create.go index 84732427..b07f13c5 100644 --- a/dialects/mssql/create.go +++ b/dialects/mssql/create.go @@ -4,10 +4,10 @@ import ( "reflect" "sort" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/callbacks" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/callbacks" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) func Create(db *gorm.DB) { diff --git a/dialects/mssql/migrator.go b/dialects/mssql/migrator.go index 1de49ae9..3bb2086d 100644 --- a/dialects/mssql/migrator.go +++ b/dialects/mssql/migrator.go @@ -3,9 +3,9 @@ package mssql import ( "fmt" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/migrator" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/migrator" ) type Migrator struct { diff --git a/dialects/mssql/mssql.go b/dialects/mssql/mssql.go index 066aa38f..3f87180c 100644 --- a/dialects/mssql/mssql.go +++ b/dialects/mssql/mssql.go @@ -7,12 +7,12 @@ import ( "strconv" _ "github.com/denisenkom/go-mssqldb" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/callbacks" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/migrator" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/callbacks" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" + "gorm.io/gorm/migrator" + "gorm.io/gorm/schema" ) type Dialector struct { diff --git a/dialects/mysql/migrator.go b/dialects/mysql/migrator.go index 467da9a2..8d3d20c6 100644 --- a/dialects/mysql/migrator.go +++ b/dialects/mysql/migrator.go @@ -3,9 +3,9 @@ package mysql import ( "fmt" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/migrator" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/migrator" ) type Migrator struct { diff --git a/dialects/mysql/mysql.go b/dialects/mysql/mysql.go index e617a1e1..035a6d79 100644 --- a/dialects/mysql/mysql.go +++ b/dialects/mysql/mysql.go @@ -6,12 +6,12 @@ import ( "math" _ "github.com/go-sql-driver/mysql" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/callbacks" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/migrator" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/callbacks" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" + "gorm.io/gorm/migrator" + "gorm.io/gorm/schema" ) type Dialector struct { diff --git a/dialects/postgres/migrator.go b/dialects/postgres/migrator.go index ef582f00..6b1085e3 100644 --- a/dialects/postgres/migrator.go +++ b/dialects/postgres/migrator.go @@ -3,10 +3,10 @@ package postgres import ( "fmt" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/migrator" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/migrator" + "gorm.io/gorm/schema" ) type Migrator struct { diff --git a/dialects/postgres/postgres.go b/dialects/postgres/postgres.go index fb3ecc68..57e51d58 100644 --- a/dialects/postgres/postgres.go +++ b/dialects/postgres/postgres.go @@ -6,12 +6,12 @@ import ( "regexp" "strconv" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/callbacks" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/migrator" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/callbacks" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" + "gorm.io/gorm/migrator" + "gorm.io/gorm/schema" _ "github.com/lib/pq" ) diff --git a/dialects/sqlite/migrator.go b/dialects/sqlite/migrator.go index 252e4183..14c682ca 100644 --- a/dialects/sqlite/migrator.go +++ b/dialects/sqlite/migrator.go @@ -5,10 +5,10 @@ import ( "regexp" "strings" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/migrator" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/migrator" + "gorm.io/gorm/schema" ) type Migrator struct { diff --git a/dialects/sqlite/sqlite.go b/dialects/sqlite/sqlite.go index 1b9809af..238ad7f9 100644 --- a/dialects/sqlite/sqlite.go +++ b/dialects/sqlite/sqlite.go @@ -3,12 +3,12 @@ package sqlite import ( "database/sql" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/callbacks" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/migrator" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/callbacks" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" + "gorm.io/gorm/migrator" + "gorm.io/gorm/schema" _ "github.com/mattn/go-sqlite3" ) diff --git a/finisher_api.go b/finisher_api.go index 780de267..5023150c 100644 --- a/finisher_api.go +++ b/finisher_api.go @@ -6,7 +6,7 @@ import ( "reflect" "strings" - "github.com/jinzhu/gorm/clause" + "gorm.io/gorm/clause" ) // Create insert the value into database diff --git a/go.mod b/go.mod index 7dabdd39..fe07494e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/jinzhu/gorm +module gorm.io/gorm go 1.14 @@ -6,8 +6,9 @@ require ( github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 github.com/go-sql-driver/mysql v1.5.0 - github.com/jinzhu/inflection v1.0.0 - github.com/jinzhu/now v1.1.1 + gorm.io/gorm v1.9.12 + gorm.io/inflection v1.0.0 + gorm.io/now v1.1.1 github.com/lib/pq v1.1.1 github.com/mattn/go-sqlite3 v2.0.1+incompatible ) diff --git a/gorm.go b/gorm.go index 07f94266..1ab3fd64 100644 --- a/gorm.go +++ b/gorm.go @@ -6,9 +6,9 @@ import ( "sync" "time" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" + "gorm.io/gorm/schema" ) // Config GORM config diff --git a/interfaces.go b/interfaces.go index 421428a3..6d9c6212 100644 --- a/interfaces.go +++ b/interfaces.go @@ -4,8 +4,8 @@ import ( "context" "database/sql" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) // Dialector GORM database dialector diff --git a/logger/logger.go b/logger/logger.go index 694adedc..2a5e445c 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm/utils" ) // Colors diff --git a/logger/sql_test.go b/logger/sql_test.go index dd7b80c8..bd852479 100644 --- a/logger/sql_test.go +++ b/logger/sql_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/now" + "gorm.io/gorm/logger" + "gorm.io/now" ) func TestExplainSQL(t *testing.T) { diff --git a/migrator/migrator.go b/migrator/migrator.go index d78c6224..afef65c3 100644 --- a/migrator/migrator.go +++ b/migrator/migrator.go @@ -6,9 +6,9 @@ import ( "reflect" "strings" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) // Migrator m struct diff --git a/scan.go b/scan.go index 4d328fde..fc6b211b 100644 --- a/scan.go +++ b/scan.go @@ -5,7 +5,7 @@ import ( "reflect" "strings" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/schema" ) func Scan(rows *sql.Rows, db *DB, initialized bool) { diff --git a/schema/callbacks_test.go b/schema/callbacks_test.go index efa01e89..dec41eba 100644 --- a/schema/callbacks_test.go +++ b/schema/callbacks_test.go @@ -5,8 +5,8 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/schema" ) type UserWithCallback struct { diff --git a/schema/check_test.go b/schema/check_test.go index e4bc9ebe..eda043b7 100644 --- a/schema/check_test.go +++ b/schema/check_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/schema" ) type UserCheck struct { diff --git a/schema/field.go b/schema/field.go index 8a0f01bf..438dadab 100644 --- a/schema/field.go +++ b/schema/field.go @@ -10,8 +10,8 @@ import ( "sync" "time" - "github.com/jinzhu/gorm/utils" - "github.com/jinzhu/now" + "gorm.io/gorm/utils" + "gorm.io/now" ) type DataType string diff --git a/schema/field_test.go b/schema/field_test.go index aac46de9..7a47f195 100644 --- a/schema/field_test.go +++ b/schema/field_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + "gorm.io/gorm/schema" + "gorm.io/gorm/tests" ) func TestFieldValuerAndSetter(t *testing.T) { diff --git a/schema/index_test.go b/schema/index_test.go index 398ddbb7..384e902b 100644 --- a/schema/index_test.go +++ b/schema/index_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/schema" ) type UserIndex struct { diff --git a/schema/model_test.go b/schema/model_test.go index 343e324e..068b3050 100644 --- a/schema/model_test.go +++ b/schema/model_test.go @@ -4,8 +4,8 @@ import ( "database/sql" "time" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + "gorm.io/gorm/tests" ) type User struct { diff --git a/schema/naming.go b/schema/naming.go index f7c82f32..1af45257 100644 --- a/schema/naming.go +++ b/schema/naming.go @@ -7,7 +7,7 @@ import ( "sync" "unicode/utf8" - "github.com/jinzhu/inflection" + "gorm.io/inflection" ) // Namer namer interface diff --git a/schema/relationship.go b/schema/relationship.go index 8b5e987c..f24c6e6d 100644 --- a/schema/relationship.go +++ b/schema/relationship.go @@ -6,8 +6,8 @@ import ( "regexp" "strings" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/inflection" + "gorm.io/gorm/clause" + "gorm.io/inflection" ) // RelationshipType relationship type diff --git a/schema/relationship_test.go b/schema/relationship_test.go index 0f62f45d..defba9ce 100644 --- a/schema/relationship_test.go +++ b/schema/relationship_test.go @@ -4,8 +4,8 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/schema" ) func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) { diff --git a/schema/schema.go b/schema/schema.go index 231ed1db..60e621de 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -8,8 +8,8 @@ import ( "reflect" "sync" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" ) // ErrUnsupportedDataType unsupported data type diff --git a/schema/schema_helper_test.go b/schema/schema_helper_test.go index b5474fe7..b966164e 100644 --- a/schema/schema_helper_test.go +++ b/schema/schema_helper_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm/schema" + "gorm.io/gorm/tests" ) func checkSchema(t *testing.T, s *schema.Schema, v schema.Schema, primaryFields []string) { diff --git a/schema/schema_test.go b/schema/schema_test.go index 958e035f..6902cbf2 100644 --- a/schema/schema_test.go +++ b/schema/schema_test.go @@ -4,8 +4,8 @@ import ( "sync" "testing" - "github.com/jinzhu/gorm/schema" - "github.com/jinzhu/gorm/tests" + "gorm.io/gorm/schema" + "gorm.io/gorm/tests" ) func TestParseSchema(t *testing.T) { diff --git a/schema/utils.go b/schema/utils.go index ca4ef2f4..da236a18 100644 --- a/schema/utils.go +++ b/schema/utils.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm/utils" ) func ParseTagSetting(str string, sep string) map[string]string { diff --git a/soft_delete.go b/soft_delete.go index 09cfff37..4ffceba6 100644 --- a/soft_delete.go +++ b/soft_delete.go @@ -5,8 +5,8 @@ import ( "database/sql/driver" "reflect" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) type DeletedAt sql.NullTime diff --git a/statement.go b/statement.go index e78dfea9..8f4762e7 100644 --- a/statement.go +++ b/statement.go @@ -10,8 +10,8 @@ import ( "strings" "sync" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" ) // Statement statement diff --git a/tests/associations_belongs_to_test.go b/tests/associations_belongs_to_test.go index 236af191..27b82ecb 100644 --- a/tests/associations_belongs_to_test.go +++ b/tests/associations_belongs_to_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestBelongsToAssociation(t *testing.T) { diff --git a/tests/associations_has_many_test.go b/tests/associations_has_many_test.go index 2269d701..88df8532 100644 --- a/tests/associations_has_many_test.go +++ b/tests/associations_has_many_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestHasManyAssociation(t *testing.T) { diff --git a/tests/associations_has_one_test.go b/tests/associations_has_one_test.go index a863cb36..9ddfa9c5 100644 --- a/tests/associations_has_one_test.go +++ b/tests/associations_has_one_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestHasOneAssociation(t *testing.T) { diff --git a/tests/associations_many2many_test.go b/tests/associations_many2many_test.go index a2db9675..d79cdc17 100644 --- a/tests/associations_many2many_test.go +++ b/tests/associations_many2many_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestMany2ManyAssociation(t *testing.T) { diff --git a/tests/associations_test.go b/tests/associations_test.go index 3668b44b..2e30df8b 100644 --- a/tests/associations_test.go +++ b/tests/associations_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func AssertAssociationCount(t *testing.T, data interface{}, name string, result int64, reason string) { diff --git a/tests/callbacks_test.go b/tests/callbacks_test.go index f8dc3e81..1dbae441 100644 --- a/tests/callbacks_test.go +++ b/tests/callbacks_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) { diff --git a/tests/count_test.go b/tests/count_test.go index 257959c3..d8cfa405 100644 --- a/tests/count_test.go +++ b/tests/count_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestCount(t *testing.T) { diff --git a/tests/create_test.go b/tests/create_test.go index 4b9694b6..4ef14ddb 100644 --- a/tests/create_test.go +++ b/tests/create_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" - "github.com/jinzhu/now" + "gorm.io/gorm" + . "gorm.io/gorm/tests" + "gorm.io/now" ) func TestCreate(t *testing.T) { diff --git a/tests/customize_column_test.go b/tests/customize_column_test.go index 49447dab..0db40869 100644 --- a/tests/customize_column_test.go +++ b/tests/customize_column_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestCustomizeColumn(t *testing.T) { diff --git a/tests/delete_test.go b/tests/delete_test.go index e7076aa6..0fe2ee75 100644 --- a/tests/delete_test.go +++ b/tests/delete_test.go @@ -4,8 +4,8 @@ import ( "errors" "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestDelete(t *testing.T) { diff --git a/tests/dummy_dialecter.go b/tests/dummy_dialecter.go index 4ea17a0f..cd4bbd45 100644 --- a/tests/dummy_dialecter.go +++ b/tests/dummy_dialecter.go @@ -1,10 +1,10 @@ package tests import ( - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/clause" - "github.com/jinzhu/gorm/logger" - "github.com/jinzhu/gorm/schema" + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/logger" + "gorm.io/gorm/schema" ) type DummyDialector struct { diff --git a/tests/embedded_struct_test.go b/tests/embedded_struct_test.go index af003786..74829460 100644 --- a/tests/embedded_struct_test.go +++ b/tests/embedded_struct_test.go @@ -3,8 +3,8 @@ package tests_test import ( "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestEmbeddedStruct(t *testing.T) { diff --git a/tests/group_by_test.go b/tests/group_by_test.go index 66a733aa..5a954348 100644 --- a/tests/group_by_test.go +++ b/tests/group_by_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestGroupBy(t *testing.T) { diff --git a/tests/hooks_test.go b/tests/hooks_test.go index 432226a3..418713a6 100644 --- a/tests/hooks_test.go +++ b/tests/hooks_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) type Product struct { diff --git a/tests/joins_table_test.go b/tests/joins_table_test.go index 091ca65c..5738d8f4 100644 --- a/tests/joins_table_test.go +++ b/tests/joins_table_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) type Person struct { diff --git a/tests/joins_test.go b/tests/joins_test.go index d9cfd22f..651b20c6 100644 --- a/tests/joins_test.go +++ b/tests/joins_test.go @@ -4,8 +4,8 @@ import ( "sort" "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestJoins(t *testing.T) { diff --git a/tests/main_test.go b/tests/main_test.go index 60cc4611..2d466125 100644 --- a/tests/main_test.go +++ b/tests/main_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestMain(m *testing.M) { diff --git a/tests/migrate_test.go b/tests/migrate_test.go index e786b1cc..b511ab40 100644 --- a/tests/migrate_test.go +++ b/tests/migrate_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestMigrate(t *testing.T) { diff --git a/tests/model.go b/tests/model.go index 1ae7c160..878129e8 100644 --- a/tests/model.go +++ b/tests/model.go @@ -4,7 +4,7 @@ import ( "database/sql" "time" - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic) diff --git a/tests/multi_primary_keys_test.go b/tests/multi_primary_keys_test.go index b3284f15..139cde69 100644 --- a/tests/multi_primary_keys_test.go +++ b/tests/multi_primary_keys_test.go @@ -5,7 +5,7 @@ import ( "sort" "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) type Blog struct { diff --git a/tests/named_polymorphic_test.go b/tests/named_polymorphic_test.go index 95b8ec7d..99a7865a 100644 --- a/tests/named_polymorphic_test.go +++ b/tests/named_polymorphic_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) type Hamster struct { diff --git a/tests/non_std_test.go b/tests/non_std_test.go index 606b4fc9..b3ac6545 100644 --- a/tests/non_std_test.go +++ b/tests/non_std_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) type Animal struct { diff --git a/tests/preload_suits_test.go b/tests/preload_suits_test.go index b71b7299..42e94fa0 100644 --- a/tests/preload_suits_test.go +++ b/tests/preload_suits_test.go @@ -6,8 +6,8 @@ import ( "reflect" "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func toJSONString(v interface{}) []byte { diff --git a/tests/preload_test.go b/tests/preload_test.go index b14c5b90..e4ecdc87 100644 --- a/tests/preload_test.go +++ b/tests/preload_test.go @@ -5,8 +5,8 @@ import ( "strconv" "testing" - "github.com/jinzhu/gorm/clause" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm/clause" + . "gorm.io/gorm/tests" ) func TestNestedPreload(t *testing.T) { diff --git a/tests/query_test.go b/tests/query_test.go index 12f29ace..9d15a41f 100644 --- a/tests/query_test.go +++ b/tests/query_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestFind(t *testing.T) { diff --git a/tests/scan_test.go b/tests/scan_test.go index fc6c1721..262ac9a7 100644 --- a/tests/scan_test.go +++ b/tests/scan_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestScan(t *testing.T) { diff --git a/tests/scanner_valuer_test.go b/tests/scanner_valuer_test.go index 9f91b5d8..7dad081f 100644 --- a/tests/scanner_valuer_test.go +++ b/tests/scanner_valuer_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestScannerValuer(t *testing.T) { diff --git a/tests/scopes_test.go b/tests/scopes_test.go index c0530da5..a2a7de3f 100644 --- a/tests/scopes_test.go +++ b/tests/scopes_test.go @@ -3,8 +3,8 @@ package tests_test import ( "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func NameIn1And2(d *gorm.DB) *gorm.DB { diff --git a/tests/soft_delete_test.go b/tests/soft_delete_test.go index f91052c1..24b06498 100644 --- a/tests/soft_delete_test.go +++ b/tests/soft_delete_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestSoftDelete(t *testing.T) { diff --git a/tests/sql_builder_test.go b/tests/sql_builder_test.go index 0aed82a2..0f3a56ed 100644 --- a/tests/sql_builder_test.go +++ b/tests/sql_builder_test.go @@ -3,8 +3,8 @@ package tests_test import ( "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestRow(t *testing.T) { diff --git a/tests/tests.go b/tests/tests.go index fa8ac836..42902685 100644 --- a/tests/tests.go +++ b/tests/tests.go @@ -7,12 +7,12 @@ import ( "path/filepath" "time" - "github.com/jinzhu/gorm" - "github.com/jinzhu/gorm/dialects/mssql" - "github.com/jinzhu/gorm/dialects/mysql" - "github.com/jinzhu/gorm/dialects/postgres" - "github.com/jinzhu/gorm/dialects/sqlite" - "github.com/jinzhu/gorm/logger" + "gorm.io/gorm" + "gorm.io/gorm/dialects/mssql" + "gorm.io/gorm/dialects/mysql" + "gorm.io/gorm/dialects/postgres" + "gorm.io/gorm/dialects/sqlite" + "gorm.io/gorm/logger" ) var DB *gorm.DB diff --git a/tests/transaction_test.go b/tests/transaction_test.go index f39b3167..4ff1b485 100644 --- a/tests/transaction_test.go +++ b/tests/transaction_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestTransaction(t *testing.T) { diff --git a/tests/update_belongs_to_test.go b/tests/update_belongs_to_test.go index 267fd4e8..7c578b38 100644 --- a/tests/update_belongs_to_test.go +++ b/tests/update_belongs_to_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestUpdateBelongsTo(t *testing.T) { diff --git a/tests/update_has_many_test.go b/tests/update_has_many_test.go index e723b940..5501c519 100644 --- a/tests/update_has_many_test.go +++ b/tests/update_has_many_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestUpdateHasManyAssociations(t *testing.T) { diff --git a/tests/update_has_one_test.go b/tests/update_has_one_test.go index 4c5036cf..721c302a 100644 --- a/tests/update_has_one_test.go +++ b/tests/update_has_one_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestUpdateHasOne(t *testing.T) { diff --git a/tests/update_many2many_test.go b/tests/update_many2many_test.go index bc7a60af..5548444f 100644 --- a/tests/update_many2many_test.go +++ b/tests/update_many2many_test.go @@ -3,7 +3,7 @@ package tests_test import ( "testing" - . "github.com/jinzhu/gorm/tests" + . "gorm.io/gorm/tests" ) func TestUpdateMany2ManyAssociations(t *testing.T) { diff --git a/tests/update_test.go b/tests/update_test.go index a5a62237..aef7f4ce 100644 --- a/tests/update_test.go +++ b/tests/update_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/jinzhu/gorm" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm" + . "gorm.io/gorm/tests" ) func TestUpdate(t *testing.T) { diff --git a/tests/upsert_test.go b/tests/upsert_test.go index 6f67f603..87b223b4 100644 --- a/tests/upsert_test.go +++ b/tests/upsert_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/jinzhu/gorm/clause" - . "github.com/jinzhu/gorm/tests" + "gorm.io/gorm/clause" + . "gorm.io/gorm/tests" ) func TestUpsert(t *testing.T) { diff --git a/tests/utils.go b/tests/utils.go index 97b5d5c8..0b4b138e 100644 --- a/tests/utils.go +++ b/tests/utils.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/jinzhu/gorm/utils" + "gorm.io/gorm/utils" ) type Config struct {