Skip to content

Commit

Permalink
fix: resolve SQL persistence tester issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 31, 2020
1 parent 00ee828 commit 4952df4
Show file tree
Hide file tree
Showing 25 changed files with 80 additions and 67 deletions.
2 changes: 1 addition & 1 deletion identity/extension_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (r *SchemaExtensionVerification) Run(ctx jsonschema.ValidationContext, s sc
return ctx.Error("format", "%q is not valid %q", value, "email")
}

address := NewVerifiableEmailAddress(fmt.Sprintf("%s", value), r.i.ID, r.lifespan)
address := NewVerifiableEmailAddress(fmt.Sprintf("%s", value), r.i.ID)

if has := r.has(r.i.VerifiableAddresses, address); has != nil {
if r.has(r.v, address) == nil {
Expand Down
9 changes: 0 additions & 9 deletions identity/extension_verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func TestSchemaExtensionVerification(t *testing.T) {
Status: VerifiableAddressStatusPending,
Via: VerifiableAddressTypeEmail,
IdentityID: iid,
ExpiresAt: time.Now().Add(time.Minute),
},
},
},
Expand Down Expand Up @@ -89,15 +88,13 @@ func TestSchemaExtensionVerification(t *testing.T) {
Status: VerifiableAddressStatusCompleted,
Via: VerifiableAddressTypeEmail,
IdentityID: iid,
ExpiresAt: time.Now().Add(time.Minute),
},
{
Value: "bar@ory.sh",
Verified: true,
Status: VerifiableAddressStatusCompleted,
Via: VerifiableAddressTypeEmail,
IdentityID: iid,
ExpiresAt: time.Now().Add(time.Minute),
},
},
},
Expand Down Expand Up @@ -127,15 +124,13 @@ func TestSchemaExtensionVerification(t *testing.T) {
Status: VerifiableAddressStatusCompleted,
Via: VerifiableAddressTypeEmail,
IdentityID: iid,
ExpiresAt: time.Now().Add(time.Minute),
},
{
Value: "bar@ory.sh",
Verified: true,
Status: VerifiableAddressStatusCompleted,
Via: VerifiableAddressTypeEmail,
IdentityID: iid,
ExpiresAt: time.Now().Add(time.Minute),
},
},
},
Expand Down Expand Up @@ -194,10 +189,6 @@ func TestSchemaExtensionVerification(t *testing.T) {
require.Len(t, addresses, len(tc.expect))

for _, actual := range addresses {
// Prevent time synchro issues
assert.True(t, actual.ExpiresAt.After(time.Now().Add(expiresAt-time.Second)))
actual.ExpiresAt = time.Time{}

var found bool
for _, expect := range tc.expect {
if reflect.DeepEqual(actual, expect) {
Expand Down
5 changes: 0 additions & 5 deletions identity/identity_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ type (

VerifiedAt sqlxx.NullTime `json:"verified_at" faker:"-" db:"verified_at"`

// required: true
ExpiresAt time.Time `json:"expires_at" faker:"time_type" db:"expires_at"`

// IdentityID is a helper struct field for gobuffalo.pop.
IdentityID uuid.UUID `json:"-" faker:"-" db:"identity_id"`
// CreatedAt is a helper struct field for gobuffalo.pop.
Expand All @@ -68,14 +65,12 @@ func (a VerifiableAddress) TableName() string {
func NewVerifiableEmailAddress(
value string,
identity uuid.UUID,
expiresIn time.Duration,
) *VerifiableAddress {
return &VerifiableAddress{
Value: value,
Verified: false,
Status: VerifiableAddressStatusPending,
Via: VerifiableAddressTypeEmail,
ExpiresAt: time.Now().Add(expiresIn).UTC(),
IdentityID: identity,
}
}
2 changes: 1 addition & 1 deletion identity/identity_verification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func TestNewVerifiableEmailAddress(t *testing.T) {
iid := x.NewUUID()
a := NewVerifiableEmailAddress("foo@ory.sh", iid, time.Minute)
a := NewVerifiableEmailAddress("foo@ory.sh", iid)

assert.Equal(t, a.Value, "foo@ory.sh")
assert.Equal(t, a.Via, VerifiableAddressTypeEmail)
Expand Down
16 changes: 6 additions & 10 deletions identity/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,11 @@ func TestPool(p PrivilegedPool) func(t *testing.T) {
})

t.Run("suite=verifiable-address", func(t *testing.T) {
createIdentityWithAddresses := func(t *testing.T, expiry time.Duration, email string) VerifiableAddress {
createIdentityWithAddresses := func(t *testing.T, email string) VerifiableAddress {
var i Identity
require.NoError(t, faker.FakeData(&i))

address := NewVerifiableEmailAddress(email, i.ID, expiry)

address.ExpiresAt = address.ExpiresAt.Round(time.Minute) // prevent mysql time synchro issues
address := NewVerifiableEmailAddress(email, i.ID)
i.VerifiableAddresses = append(i.VerifiableAddresses, *address)

require.NoError(t, p.CreateIdentity(context.Background(), &i))
Expand All @@ -416,17 +414,15 @@ func TestPool(p PrivilegedPool) func(t *testing.T) {
t.Run("case=create and find", func(t *testing.T) {
addresses := make([]VerifiableAddress, 15)
for k := range addresses {
addresses[k] = createIdentityWithAddresses(t, time.Minute, "recovery.TestPersister.Create"+strconv.Itoa(k)+"@ory.sh")
addresses[k] = createIdentityWithAddresses(t, "recovery.TestPersister.Create"+strconv.Itoa(k)+"@ory.sh")
require.NotEmpty(t, addresses[k].ID)
}

compare := func(t *testing.T, expected, actual VerifiableAddress) {
actual.CreatedAt = actual.CreatedAt.UTC().Truncate(time.Hour * 24)
actual.UpdatedAt = actual.UpdatedAt.UTC().Truncate(time.Hour * 24)
actual.ExpiresAt = actual.ExpiresAt.UTC().Truncate(time.Hour * 24)
expected.CreatedAt = expected.CreatedAt.UTC().Truncate(time.Hour * 24)
expected.UpdatedAt = expected.UpdatedAt.UTC().Truncate(time.Hour * 24)
expected.ExpiresAt = expected.ExpiresAt.UTC().Truncate(time.Hour * 24)
assert.EqualValues(t, expected, actual)
}

Expand All @@ -442,7 +438,7 @@ func TestPool(p PrivilegedPool) func(t *testing.T) {
})

t.Run("case=update", func(t *testing.T) {
address := createIdentityWithAddresses(t, time.Minute, "verification.TestPersister.Update@ory.sh")
address := createIdentityWithAddresses(t, "verification.TestPersister.Update@ory.sh")

address.Value = "new-code"
require.NoError(t, p.UpdateVerifiableAddress(context.Background(), &address))
Expand All @@ -456,14 +452,14 @@ func TestPool(p PrivilegedPool) func(t *testing.T) {
var i Identity
require.NoError(t, faker.FakeData(&i))

address := NewVerifiableEmailAddress("verification.TestPersister.Update-Identity@ory.sh", i.ID, time.Hour)
address := NewVerifiableEmailAddress("verification.TestPersister.Update-Identity@ory.sh", i.ID)
i.VerifiableAddresses = append(i.VerifiableAddresses, *address)
require.NoError(t, p.CreateIdentity(context.Background(), &i))

_, err := p.FindVerifiableAddressByValue(context.Background(), VerifiableAddressTypeEmail, "verification.TestPersister.Update-Identity@ory.sh")
require.NoError(t, err)

address = NewVerifiableEmailAddress("verification.TestPersister.Update-Identity-next@ory.sh", i.ID, time.Hour)
address = NewVerifiableEmailAddress("verification.TestPersister.Update-Identity-next@ory.sh", i.ID)
i.VerifiableAddresses = []VerifiableAddress{*address}
require.NoError(t, p.UpdateIdentity(context.Background(), &i))

Expand Down
14 changes: 12 additions & 2 deletions internal/testhelpers/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,33 @@ func CleanSQL(t *testing.T, c *pop.Connection) {
for _, table := range []string{
new(continuity.Container).TableName(),
new(courier.Message).TableName(),

new(login.FlowMethods).TableName(),
new(login.Flow).TableName(),

new(registration.FlowMethods).TableName(),
new(registration.Flow).TableName(),

new(settings.FlowMethods).TableName(),
new(settings.Flow).TableName(),

new(link.RecoveryToken).TableName(),
new(recovery.RequestMethods).TableName(),
new(link.VerificationToken).TableName(),

new(recovery.FlowMethods).TableName(),
new(recovery.Flow).TableName(),

new(verification.Flow).TableName(),
new(verification.FlowMethods).TableName(),

new(errorx.ErrorContainer).TableName(),

new(session.Session).TableName(),
new(identity.CredentialIdentifierCollection).TableName(),
new(identity.CredentialsCollection).TableName(),
new(identity.VerifiableAddress).TableName(),
new(identity.RecoveryAddress).TableName(),
new(identity.Identity).TableName(),
new(errorx.ErrorContainer).TableName(),
new(identity.CredentialsTypeTable).TableName(),
"schema_migration",
} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PRIMARY KEY("id"),
"updated_at" timestamp NOT NULL
);COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "selfservice_verification_flows" ADD COLUMN "active_method" VARCHAR (32);COMMIT TRANSACTION;BEGIN TRANSACTION;
INSERT INTO selfservice_verification_flow_methods (id, method, selfservice_verification_flow_id, config) SELECT id, 'link', id, form FROM selfservice_verification_flows;
INSERT INTO selfservice_verification_flow_methods (id, method, selfservice_verification_flow_id, config, created_at, updated_at) SELECT id, 'link', id, form, created_at, updated_at FROM selfservice_verification_flows;
ALTER TABLE "selfservice_verification_flows" DROP COLUMN "form";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "selfservice_verification_flows" DROP COLUMN "via";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "selfservice_verification_flows" DROP COLUMN "success";COMMIT TRANSACTION;BEGIN TRANSACTION;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PRIMARY KEY(`id`),
`updated_at` DATETIME NOT NULL
) ENGINE=InnoDB;
ALTER TABLE `selfservice_verification_flows` ADD COLUMN `active_method` VARCHAR (32);
INSERT INTO selfservice_verification_flow_methods (id, method, selfservice_verification_flow_id, config) SELECT id, 'link', id, form FROM selfservice_verification_flows;
INSERT INTO selfservice_verification_flow_methods (id, method, selfservice_verification_flow_id, config, created_at, updated_at) SELECT id, 'link', id, form, created_at, updated_at FROM selfservice_verification_flows;
ALTER TABLE `selfservice_verification_flows` DROP COLUMN `form`;
ALTER TABLE `selfservice_verification_flows` DROP COLUMN `via`;
ALTER TABLE `selfservice_verification_flows` DROP COLUMN `success`;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PRIMARY KEY("id"),
"updated_at" timestamp NOT NULL
);
ALTER TABLE "selfservice_verification_flows" ADD COLUMN "active_method" VARCHAR (32);
INSERT INTO selfservice_verification_flow_methods (id, method, selfservice_verification_flow_id, config) SELECT id, 'link', id, form FROM selfservice_verification_flows;
INSERT INTO selfservice_verification_flow_methods (id, method, selfservice_verification_flow_id, config, created_at, updated_at) SELECT id, 'link', id, form, created_at, updated_at FROM selfservice_verification_flows;
ALTER TABLE "selfservice_verification_flows" DROP COLUMN "form";
ALTER TABLE "selfservice_verification_flows" DROP COLUMN "via";
ALTER TABLE "selfservice_verification_flows" DROP COLUMN "success";
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "code" VARCHAR (32);COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" RENAME COLUMN "code" TO "_code_tmp";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "code" VARCHAR (32);COMMIT TRANSACTION;BEGIN TRANSACTION;
UPDATE "identity_verifiable_addresses" SET "code" = "_code_tmp";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" ALTER COLUMN "code" SET NOT NULL;COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "_code_tmp";COMMIT TRANSACTION;BEGIN TRANSACTION;
CREATE UNIQUE INDEX "identity_verifiable_addresses_code_uq_idx" ON "identity_verifiable_addresses" (code);COMMIT TRANSACTION;BEGIN TRANSACTION;
CREATE INDEX "identity_verifiable_addresses_code_idx" ON "identity_verifiable_addresses" (code);COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "code" VARCHAR (32);COMMIT TRANSACTION;BEGIN TRANSACTION;
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DROP INDEX IF EXISTS "identity_verifiable_addresses_code_uq_idx";COMMIT TRANSACTION;BEGIN TRANSACTION;
DROP INDEX IF EXISTS "identity_verifiable_addresses_code_idx";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "code";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "code";COMMIT TRANSACTION;BEGIN TRANSACTION;
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "expires_at";COMMIT TRANSACTION;BEGIN TRANSACTION;
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
ALTER TABLE `identity_verifiable_addresses` ADD COLUMN `code` VARCHAR (32);
ALTER TABLE `identity_verifiable_addresses` MODIFY `code` VARCHAR (32) NOT NULL;
CREATE UNIQUE INDEX `identity_verifiable_addresses_code_uq_idx` ON `identity_verifiable_addresses` (`code`);
CREATE INDEX `identity_verifiable_addresses_code_idx` ON `identity_verifiable_addresses` (`code`);
ALTER TABLE `identity_verifiable_addresses` ADD COLUMN `code` VARCHAR (32);
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DROP INDEX `identity_verifiable_addresses_code_uq_idx` ON `identity_verifiable_addresses`;
DROP INDEX `identity_verifiable_addresses_code_idx` ON `identity_verifiable_addresses`;
ALTER TABLE `identity_verifiable_addresses` DROP COLUMN `code`;
ALTER TABLE `identity_verifiable_addresses` DROP COLUMN `code`;
ALTER TABLE `identity_verifiable_addresses` DROP COLUMN `expires_at`;
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "code" VARCHAR (32);
ALTER TABLE "identity_verifiable_addresses" ALTER COLUMN "code" TYPE VARCHAR (32), ALTER COLUMN "code" SET NOT NULL;
CREATE UNIQUE INDEX "identity_verifiable_addresses_code_uq_idx" ON "identity_verifiable_addresses" (code);
CREATE INDEX "identity_verifiable_addresses_code_idx" ON "identity_verifiable_addresses" (code);
ALTER TABLE "identity_verifiable_addresses" ADD COLUMN "code" VARCHAR (32);
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DROP INDEX "identity_verifiable_addresses_code_uq_idx";
DROP INDEX "identity_verifiable_addresses_code_idx";
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "code";
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "code";
ALTER TABLE "identity_verifiable_addresses" DROP COLUMN "expires_at";
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,25 @@ CREATE INDEX "identity_verifiable_addresses_status_via_idx" ON "_identity_verifi
CREATE UNIQUE INDEX "identity_verifiable_addresses_status_via_uq_idx" ON "_identity_verifiable_addresses_tmp" (via, value);
INSERT INTO "_identity_verifiable_addresses_tmp" (id, status, via, verified, value, verified_at, expires_at, identity_id, created_at, updated_at) SELECT id, status, via, verified, value, verified_at, expires_at, identity_id, created_at, updated_at FROM "identity_verifiable_addresses";

DROP TABLE "identity_verifiable_addresses";
ALTER TABLE "_identity_verifiable_addresses_tmp" RENAME TO "identity_verifiable_addresses";
DROP INDEX IF EXISTS "identity_verifiable_addresses_status_via_idx";
DROP INDEX IF EXISTS "identity_verifiable_addresses_status_via_uq_idx";
CREATE TABLE "_identity_verifiable_addresses_tmp" (
"id" TEXT PRIMARY KEY,
"status" TEXT NOT NULL,
"via" TEXT NOT NULL,
"verified" bool NOT NULL,
"value" TEXT NOT NULL,
"verified_at" DATETIME,
"identity_id" char(36) NOT NULL,
"created_at" DATETIME NOT NULL,
"updated_at" DATETIME NOT NULL,
FOREIGN KEY (identity_id) REFERENCES identities (id) ON UPDATE NO ACTION ON DELETE CASCADE
);
CREATE INDEX "identity_verifiable_addresses_status_via_idx" ON "_identity_verifiable_addresses_tmp" (via, value);
CREATE UNIQUE INDEX "identity_verifiable_addresses_status_via_uq_idx" ON "_identity_verifiable_addresses_tmp" (via, value);
INSERT INTO "_identity_verifiable_addresses_tmp" (id, status, via, verified, value, verified_at, identity_id, created_at, updated_at) SELECT id, status, via, verified, value, verified_at, identity_id, created_at, updated_at FROM "identity_verifiable_addresses";

DROP TABLE "identity_verifiable_addresses";
ALTER TABLE "_identity_verifiable_addresses_tmp" RENAME TO "identity_verifiable_addresses";
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ change_column("identity_verifiable_addresses", "code", "string", {"size": 32})

add_index("identity_verifiable_addresses", ["code"], { "unique": true, "name": "identity_verifiable_addresses_code_uq_idx" })
add_index("identity_verifiable_addresses", ["code"], { "name": "identity_verifiable_addresses_code_idx" })

add_column("identity_verifiable_addresses", "expires_at", "timestamp", { "default_raw": "CURRENT_TIMESTAMP" })
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ drop_index("identity_verifiable_addresses", "identity_verifiable_addresses_code_
drop_index("identity_verifiable_addresses", "identity_verifiable_addresses_code_idx")

drop_column("identity_verifiable_addresses", "code")
drop_column("identity_verifiable_addresses", "expires_at")
2 changes: 1 addition & 1 deletion persistence/sql/persister_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestPersister(t *testing.T) {
_ = os.Remove("migrations/schema.sql")
testhelpers.CleanSQL(t, p.(*sql.Persister).Connection())
t.Cleanup(func() {
// testhelpers.CleanSQL(t, p.(*sql.Persister).Connection())
testhelpers.CleanSQL(t, p.(*sql.Persister).Connection())
_ = os.Remove("migrations/schema.sql")
})

Expand Down
4 changes: 2 additions & 2 deletions selfservice/flow/recovery/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type Flow struct {
Methods map[string]*FlowMethod `json:"methods" faker:"recovery_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw RequestMethodsRaw `json:"-" faker:"-" has_many:"selfservice_recovery_flow_methods" fk_id:"selfservice_recovery_flow_id"`
MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_recovery_flow_methods" fk_id:"selfservice_recovery_flow_id"`

// State represents the state of this request:
//
Expand Down Expand Up @@ -145,7 +145,7 @@ func (f *Flow) AfterSave(c *pop.Connection) error {
}

func (f *Flow) AfterFind(_ *pop.Connection) error {
f.Methods = make(RequestMethods)
f.Methods = make(FlowMethods)
for key := range f.MethodsRaw {
m := f.MethodsRaw[key] // required for pointer dereference
f.Methods[m.Method] = &m
Expand Down
8 changes: 4 additions & 4 deletions selfservice/flow/recovery/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ func (u FlowMethod) TableName() string {
return "selfservice_recovery_flow_methods"
}

type RequestMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type RequestMethods map[string]*FlowMethod
type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[string]*FlowMethod

func (u RequestMethods) TableName() string {
func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_recovery_flow_methods"
}

func (u RequestMethodsRaw) TableName() string {
func (u FlowMethodsRaw) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_recovery_flow_methods"
}
Expand Down
4 changes: 2 additions & 2 deletions selfservice/flow/verification/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type Flow struct {
Methods map[string]*FlowMethod `json:"methods" faker:"verification_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw RequestMethodsRaw `json:"-" faker:"-" has_many:"selfservice_verification_flow_methods" fk_id:"selfservice_verification_flow_id"`
MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_verification_flow_methods" fk_id:"selfservice_verification_flow_id"`

// State represents the state of this request:
//
Expand Down Expand Up @@ -152,7 +152,7 @@ func (f *Flow) AfterSave(c *pop.Connection) error {
}

func (f *Flow) AfterFind(_ *pop.Connection) error {
f.Methods = make(RequestMethods)
f.Methods = make(FlowMethods)
for key := range f.MethodsRaw {
m := f.MethodsRaw[key] // required for pointer dereference
f.Methods[m.Method] = &m
Expand Down
8 changes: 4 additions & 4 deletions selfservice/flow/verification/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ func (u FlowMethod) TableName() string {
return "selfservice_verification_flow_methods"
}

type RequestMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type RequestMethods map[string]*FlowMethod
type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[string]*FlowMethod

func (u RequestMethods) TableName() string {
func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_verification_flow_methods"
}

func (u RequestMethodsRaw) TableName() string {
func (u FlowMethodsRaw) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_verification_flow_methods"
}
Expand Down
Loading

0 comments on commit 4952df4

Please sign in to comment.