Skip to content

Commit af87c7a

Browse files
author
gangachris
committed
change event store index order
1 parent 793d8e0 commit af87c7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strategy/json/sql/postgres/single_stream_strategy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ func (s *SingleStreamStrategy) CreateSchema(tableName string) []string {
5555
);`,
5656
tableName,
5757
)
58-
statements[1] = fmt.Sprintf(`CREATE UNIQUE INDEX ON %s (aggregate_id, aggregate_type, aggregate_version);`, tableName)
59-
statements[2] = fmt.Sprintf(`CREATE INDEX ON %s (no, aggregate_id, aggregate_type);`, tableName)
58+
statements[1] = fmt.Sprintf(`CREATE UNIQUE INDEX ON %s (aggregate_type, aggregate_id, aggregate_version);`, tableName)
59+
statements[2] = fmt.Sprintf(`CREATE INDEX ON %s (aggregate_type, aggregate_id, no);`, tableName)
6060

6161
return statements
6262
}

0 commit comments

Comments
 (0)