mirror of
https://github.com/zitadel/zitadel
synced 2024-11-22 00:39:36 +00:00
fix: projection version of restrictions (#7028)
This commit is contained in:
parent
ec03340b67
commit
970c062307
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
RestrictionsProjectionTable = "projections.restrictions"
|
||||
RestrictionsProjectionTable = "projections.restrictions2"
|
||||
|
||||
RestrictionsColumnAggregateID = "aggregate_id"
|
||||
RestrictionsColumnCreationDate = "creation_date"
|
||||
|
@ -35,7 +35,7 @@ func TestRestrictionsProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "INSERT INTO projections.restrictions (instance_id, resource_owner, creation_date, change_date, sequence, aggregate_id, disallow_public_org_registration) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (instance_id, resource_owner) DO UPDATE SET (creation_date, change_date, sequence, aggregate_id, disallow_public_org_registration) = (projections.restrictions.creation_date, EXCLUDED.change_date, EXCLUDED.sequence, EXCLUDED.aggregate_id, EXCLUDED.disallow_public_org_registration)",
|
||||
expectedStmt: "INSERT INTO projections.restrictions2 (instance_id, resource_owner, creation_date, change_date, sequence, aggregate_id, disallow_public_org_registration) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (instance_id, resource_owner) DO UPDATE SET (creation_date, change_date, sequence, aggregate_id, disallow_public_org_registration) = (projections.restrictions2.creation_date, EXCLUDED.change_date, EXCLUDED.sequence, EXCLUDED.aggregate_id, EXCLUDED.disallow_public_org_registration)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
"ro-id",
|
||||
@ -66,7 +66,7 @@ func TestRestrictionsProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "INSERT INTO projections.restrictions (instance_id, resource_owner, creation_date, change_date, sequence, aggregate_id) VALUES ($1, $2, $3, $4, $5, $6) ON CONFLICT (instance_id, resource_owner) DO UPDATE SET (creation_date, change_date, sequence, aggregate_id) = (projections.restrictions.creation_date, EXCLUDED.change_date, EXCLUDED.sequence, EXCLUDED.aggregate_id)",
|
||||
expectedStmt: "INSERT INTO projections.restrictions2 (instance_id, resource_owner, creation_date, change_date, sequence, aggregate_id) VALUES ($1, $2, $3, $4, $5, $6) ON CONFLICT (instance_id, resource_owner) DO UPDATE SET (creation_date, change_date, sequence, aggregate_id) = (projections.restrictions2.creation_date, EXCLUDED.change_date, EXCLUDED.sequence, EXCLUDED.aggregate_id)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
"ro-id",
|
||||
|
@ -14,14 +14,14 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
expectedRestrictionsQuery = regexp.QuoteMeta("SELECT projections.restrictions.aggregate_id," +
|
||||
" projections.restrictions.creation_date," +
|
||||
" projections.restrictions.change_date," +
|
||||
" projections.restrictions.resource_owner," +
|
||||
" projections.restrictions.sequence," +
|
||||
" projections.restrictions.disallow_public_org_registration," +
|
||||
" projections.restrictions.allowed_languages" +
|
||||
" FROM projections.restrictions" +
|
||||
expectedRestrictionsQuery = regexp.QuoteMeta("SELECT projections.restrictions2.aggregate_id," +
|
||||
" projections.restrictions2.creation_date," +
|
||||
" projections.restrictions2.change_date," +
|
||||
" projections.restrictions2.resource_owner," +
|
||||
" projections.restrictions2.sequence," +
|
||||
" projections.restrictions2.disallow_public_org_registration," +
|
||||
" projections.restrictions2.allowed_languages" +
|
||||
" FROM projections.restrictions2" +
|
||||
" AS OF SYSTEM TIME '-1 ms'",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user