diff --git a/client/manager_sql.go b/client/manager_sql.go index 7f2590b330d..60cc90e1c56 100644 --- a/client/manager_sql.go +++ b/client/manager_sql.go @@ -38,9 +38,9 @@ import ( "github.com/ory/x/sqlcon" ) -var Migrations = map[string]*migrate.PackrMigrationSource{ - dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/shared", "migrations/sql/mysql"}), - dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/shared", "migrations/sql/postgres"}), +var Migrations = map[string]*dbal.PackrMigrationSource{ + dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/shared", "migrations/sql/mysql"}, true), + dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/shared", "migrations/sql/postgres"}, true), } func NewSQLManager(db *sqlx.DB, h fosite.Hasher) *SQLManager { diff --git a/client/x_manager_sql_migrations_test.go b/client/x_manager_sql_migrations_test.go index b3b185d3e27..56f0a2eaca6 100644 --- a/client/x_manager_sql_migrations_test.go +++ b/client/x_manager_sql_migrations_test.go @@ -26,7 +26,6 @@ import ( "testing" "github.com/jmoiron/sqlx" - migrate "github.com/rubenv/sql-migrate" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -36,9 +35,9 @@ import ( "github.com/ory/x/dbal/migratest" ) -var createMigrations = map[string]*migrate.PackrMigrationSource{ - dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}), - dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}), +var createMigrations = map[string]*dbal.PackrMigrationSource{ + dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}, true), + dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}, true), } func CleanTestDB(t *testing.T, db *sqlx.DB) { diff --git a/consent/sql_helper.go b/consent/sql_helper.go index 22ba86747de..3e8cb5319b1 100644 --- a/consent/sql_helper.go +++ b/consent/sql_helper.go @@ -27,7 +27,6 @@ import ( "time" "github.com/pkg/errors" - "github.com/rubenv/sql-migrate" "github.com/sirupsen/logrus" "github.com/ory/go-convenience/stringsx" @@ -35,15 +34,15 @@ import ( "github.com/ory/x/dbal" ) -var Migrations = map[string]*migrate.PackrMigrationSource{ +var Migrations = map[string]*dbal.PackrMigrationSource{ "mysql": dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{ "migrations/sql/shared", "migrations/sql/mysql", - }), + }, true), "postgres": dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{ "migrations/sql/shared", "migrations/sql/postgres", - }), + }, true), } var sqlParamsAuthenticationRequestHandled = []string{ diff --git a/consent/x_manager_sql_migrations_test.go b/consent/x_manager_sql_migrations_test.go index 31a73e993ec..2f13fd19859 100644 --- a/consent/x_manager_sql_migrations_test.go +++ b/consent/x_manager_sql_migrations_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/jmoiron/sqlx" - migrate "github.com/rubenv/sql-migrate" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" @@ -17,9 +16,9 @@ import ( "github.com/ory/x/dbal/migratest" ) -var createMigrations = map[string]*migrate.PackrMigrationSource{ - dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), consent.AssetNames(), consent.Asset, []string{"migrations/sql/tests"}), - dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), consent.AssetNames(), consent.Asset, []string{"migrations/sql/tests"}), +var createMigrations = map[string]*dbal.PackrMigrationSource{ + dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), consent.AssetNames(), consent.Asset, []string{"migrations/sql/tests"}, true), + dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), consent.AssetNames(), consent.Asset, []string{"migrations/sql/tests"}, true), } func cleanDB(t *testing.T, db *sqlx.DB) { diff --git a/docker-compose-twoc.yml b/docker-compose-twoc.yml index 199f56cac0a..cfa66b312e8 100644 --- a/docker-compose-twoc.yml +++ b/docker-compose-twoc.yml @@ -84,7 +84,7 @@ services: consent: environment: - HYDRA_ADMIN_URL=http://hydra-admin:4445 - image: oryd/hydra-login-consent-node:v1.0.0-beta.9 + image: oryd/hydra-login-consent-node:v1.0.0-rc.2 links: - hydra-admin ports: diff --git a/docker-compose.yml b/docker-compose.yml index 68a84851197..16e98a12fe0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,7 +72,7 @@ services: consent: environment: - HYDRA_ADMIN_URL=http://hydra:4445 - image: oryd/hydra-login-consent-node:v1.0.0-beta.9 + image: oryd/hydra-login-consent-node:v1.0.0-rc.2 links: - hydra ports: diff --git a/go.mod b/go.mod index 992c1fd343b..b901cb48834 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/ory/graceful v0.1.0 github.com/ory/herodot v0.4.1 github.com/ory/sqlcon v0.0.7 - github.com/ory/x v0.0.30 + github.com/ory/x v0.0.32 github.com/pborman/uuid v1.2.0 github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5 github.com/pkg/errors v0.8.0 diff --git a/go.sum b/go.sum index 6d201ffaad0..9734805bf8a 100644 --- a/go.sum +++ b/go.sum @@ -180,6 +180,10 @@ github.com/ory/x v0.0.29 h1:rpKMq1/QeY5UcXBXjzKs1DugWj1SRBB692mCEgxR7u8= github.com/ory/x v0.0.29/go.mod h1:ARp3iXjJhOEErlXHwUtfgVtEN1VnmW1ZxBZ0bw8eARk= github.com/ory/x v0.0.30 h1:pfbgmGEkuy+k4I8VAOnFlTpsiFTBHhpv/rAUvhBHgJ0= github.com/ory/x v0.0.30/go.mod h1:4hnvHBE1KfoPP99R82BH72s3UnHt//MmWX+5NYnfzFQ= +github.com/ory/x v0.0.31 h1:aDO76m7b5wUu5wfZQ8dHzWGV0qHxgAzUFfRIpkB+XFw= +github.com/ory/x v0.0.31/go.mod h1:4hnvHBE1KfoPP99R82BH72s3UnHt//MmWX+5NYnfzFQ= +github.com/ory/x v0.0.32 h1:fgxawi8zaB/WODqNcIukSsBfq5C64s2Xh7sOEjUuHhc= +github.com/ory/x v0.0.32/go.mod h1:4hnvHBE1KfoPP99R82BH72s3UnHt//MmWX+5NYnfzFQ= github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= diff --git a/jwk/manager_sql.go b/jwk/manager_sql.go index ba6acb0b719..50cbf80dd75 100644 --- a/jwk/manager_sql.go +++ b/jwk/manager_sql.go @@ -45,15 +45,15 @@ func NewSQLManager(db *sqlx.DB, key []byte) *SQLManager { return &SQLManager{DB: db, Cipher: &AEAD{Key: key}} } -var migrations = map[string]*migrate.PackrMigrationSource{ +var migrations = map[string]*dbal.PackrMigrationSource{ dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{ "migrations/sql/shared", "migrations/sql/mysql", - }), + }, true), dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{ "migrations/sql/shared", "migrations/sql/postgres", - }), + }, true), } type sqlData struct { diff --git a/jwk/x_manager_sql_migrations_test.go b/jwk/x_manager_sql_migrations_test.go index 3adf145526b..9d180a93185 100644 --- a/jwk/x_manager_sql_migrations_test.go +++ b/jwk/x_manager_sql_migrations_test.go @@ -26,7 +26,6 @@ import ( "testing" "github.com/jmoiron/sqlx" - migrate "github.com/rubenv/sql-migrate" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" @@ -35,9 +34,9 @@ import ( "github.com/ory/x/dbal/migratest" ) -var createMigrations = map[string]*migrate.PackrMigrationSource{ - dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}), - dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}), +var createMigrations = map[string]*dbal.PackrMigrationSource{ + dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}, true), + dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{"migrations/sql/tests"}, true), } func TestXXMigrations(t *testing.T) { diff --git a/oauth2/fosite_store_sql.go b/oauth2/fosite_store_sql.go index 6e7d696396c..87ad8b481a6 100644 --- a/oauth2/fosite_store_sql.go +++ b/oauth2/fosite_store_sql.go @@ -73,15 +73,15 @@ const ( sqlTablePKCE = "pkce" ) -var Migrations = map[string]*migrate.PackrMigrationSource{ +var Migrations = map[string]*dbal.PackrMigrationSource{ dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{ "migrations/sql/shared", "migrations/sql/mysql", - }), + }, true), dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), AssetNames(), Asset, []string{ "migrations/sql/shared", "migrations/sql/postgres", - }), + }, true), } var sqlParams = []string{ diff --git a/oauth2/x_fosite_migrations_test.go b/oauth2/x_fosite_migrations_test.go index c3d36c52096..eb16dc0f7dd 100644 --- a/oauth2/x_fosite_migrations_test.go +++ b/oauth2/x_fosite_migrations_test.go @@ -7,7 +7,6 @@ import ( "time" "github.com/jmoiron/sqlx" - migrate "github.com/rubenv/sql-migrate" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" @@ -19,9 +18,9 @@ import ( "github.com/ory/x/dbal/migratest" ) -var createMigrations = map[string]*migrate.PackrMigrationSource{ - dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), oauth2.AssetNames(), oauth2.Asset, []string{"migrations/sql/tests"}), - dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), oauth2.AssetNames(), oauth2.Asset, []string{"migrations/sql/tests"}), +var createMigrations = map[string]*dbal.PackrMigrationSource{ + dbal.DriverMySQL: dbal.NewMustPackerMigrationSource(logrus.New(), oauth2.AssetNames(), oauth2.Asset, []string{"migrations/sql/tests"}, true), + dbal.DriverPostgreSQL: dbal.NewMustPackerMigrationSource(logrus.New(), oauth2.AssetNames(), oauth2.Asset, []string{"migrations/sql/tests"}, true), } func cleanDB(t *testing.T, db *sqlx.DB) {