mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 20:07:42 +00:00
fix: rename tables failed_event to failed_events (#287)
* fix: rename tables failed_event to failed_events * fix: use const
This commit is contained in:
parent
79eff2795f
commit
5a0876cf98
@ -5,7 +5,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
errTable = "admin_api.failed_event"
|
errTable = "admin_api.failed_events"
|
||||||
|
errColumn = "failed_events"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
||||||
@ -13,7 +14,7 @@ func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (v *View) RemoveFailedEvent(database string, failedEvent *repository.FailedEvent) error {
|
func (v *View) RemoveFailedEvent(database string, failedEvent *repository.FailedEvent) error {
|
||||||
return repository.RemoveFailedEvent(v.Db, database+".failed_event", failedEvent)
|
return repository.RemoveFailedEvent(v.Db, database+"."+errColumn, failedEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *View) latestFailedEvent(viewName string, sequence uint64) (*repository.FailedEvent, error) {
|
func (v *View) latestFailedEvent(viewName string, sequence uint64) (*repository.FailedEvent, error) {
|
||||||
@ -21,5 +22,5 @@ func (v *View) latestFailedEvent(viewName string, sequence uint64) (*repository.
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (v *View) AllFailedEvents(db string) ([]*repository.FailedEvent, error) {
|
func (v *View) AllFailedEvents(db string) ([]*repository.FailedEvent, error) {
|
||||||
return repository.AllFailedEvents(v.Db, db+".failed_event")
|
return repository.AllFailedEvents(v.Db, db+"."+errColumn)
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
errTable = "auth.failed_event"
|
errTable = "auth.failed_events"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
errTable = "authz.failed_event"
|
errTable = "authz.failed_events"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
errTable = "management.failed_event"
|
errTable = "management.failed_events"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
errTable = "notification.failed_event"
|
errTable = "notification.failed_events"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
func (v *View) saveFailedEvent(failedEvent *repository.FailedEvent) error {
|
||||||
|
9
migrations/cockroach/V1.24__failed_events.sql
Normal file
9
migrations/cockroach/V1.24__failed_events.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TABLE management.failed_event RENAME TO management.failed_events;
|
||||||
|
ALTER TABLE auth.failed_event RENAME TO auth.failed_events;
|
||||||
|
ALTER TABLE notification.failed_event RENAME TO notification.failed_events;
|
||||||
|
ALTER TABLE authz.failed_event RENAME TO authz.failed_events;
|
||||||
|
ALTER TABLE admin.failed_event RENAME TO admin.failed_events;
|
||||||
|
|
||||||
|
COMMIT;
|
Loading…
x
Reference in New Issue
Block a user