Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eventstore): new column to test clock_timestamp()
- Loading branch information
1 parent
35a0977
commit c6d29fc
Showing
8 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package setup | ||
|
||
import ( | ||
"context" | ||
_ "embed" | ||
|
||
"github.com/zitadel/zitadel/internal/database" | ||
) | ||
|
||
var ( | ||
//go:embed 11.sql | ||
addEventCreatedAt string | ||
) | ||
|
||
type AddEventCreatedAt struct { | ||
dbClient *database.DB | ||
} | ||
|
||
func (mig *AddEventCreatedAt) Execute(ctx context.Context) error { | ||
_, err := mig.dbClient.ExecContext(ctx, addEventCreatedAt) | ||
return err | ||
} | ||
|
||
func (mig *AddEventCreatedAt) String() string { | ||
return "11_event_created_at" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE eventstore.events ADD COLUMN created_at TIMESTAMPTZ /*NOT NULL*/ DEFAULT clock_timestamp(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters