Skip to content

Commit

Permalink
delete cluster_config's created time since it already has
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenxia committed Jan 13, 2025
1 parent 1db101a commit 582de9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ import (
)

func (db *cdb) InsertConfig(ctx context.Context, row *persistence.InternalConfigStoreEntry) error {
timeStamp := db.timeSrc.Now()
query := db.session.Query(templateInsertConfig, row.RowType, row.Version, row.Timestamp, row.Values.Data, row.Values.Encoding, timeStamp).WithContext(ctx)
query := db.session.Query(templateInsertConfig, row.RowType, row.Version, row.Timestamp, row.Values.Data, row.Values.Encoding).WithContext(ctx)
applied, err := query.MapScanCAS(make(map[string]interface{}))
if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (
`WHERE row_type = ? ` +
`LIMIT 1;`

templateInsertConfig = `INSERT INTO cluster_config (row_type, version, timestamp, values, encoding, created_time) ` +
`VALUES (?, ?, ?, ?, ?, ?) ` +
templateInsertConfig = `INSERT INTO cluster_config (row_type, version, timestamp, values, encoding) ` +
`VALUES (?, ?, ?, ?, ?) ` +
`IF NOT EXISTS;`
)

0 comments on commit 582de9a

Please sign in to comment.