This function was returning the set of deletion tables. A view seems better suited for this task since it would allow for applying additional filters of the result set. This was particularly necessary to easily make changes to some sqltests due to switching the delete trigger for the session table. (cherry picked from commit 32d41639892950b21fafc39b50c10b997c6d5121)
15 lines
255 B
Go
15 lines
255 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package purge
|
|
|
|
const (
|
|
getDeletionTablesQuery = `
|
|
select tablename
|
|
from deletion_table;
|
|
`
|
|
deleteQueryTemplate = `
|
|
delete from %s where delete_time < now() - interval '30 days'
|
|
`
|
|
)
|