feat(tfstated): allow configuration of version history limit via environment variable
This commit is contained in:
parent
4c2032e1f0
commit
1ebf0341dd
5 changed files with 43 additions and 9 deletions
|
@ -102,7 +102,8 @@ func (db *DB) SetState(name string, data []byte, lockID string) (bool, error) {
|
|||
JOIN states ON states.id = versions.state_id
|
||||
WHERE states.name = :name
|
||||
ORDER BY versions.id DESC
|
||||
LIMIT 64));`,
|
||||
LIMIT :limit));`,
|
||||
sql.Named("limit", db.versionsHistoryLimit),
|
||||
sql.Named("name", name),
|
||||
)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue