Migration 00005: clusters with members (composite foreign keys keep the roles of agents, clusters, zones and networks apart), TSIG keys with sealed secrets, zones with update keys, typed DNS records, the DHCP cluster of a network, revision files per target with a secret flag and sealed revision secrets. Repositories for the new tables and for the lease adoption. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
444 B
Go
18 lines
444 B
Go
// SPDX-License-Identifier: LicenseRef-DDI-Proprietary
|
|
|
|
package store
|
|
|
|
import "context"
|
|
|
|
// MigrateDownTo rolls the schema back to version (tests of the Down
|
|
// sections).
|
|
func (s *Store) MigrateDownTo(ctx context.Context, version int64) error {
|
|
p, closeDB, err := s.newProvider()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
defer closeDB() //nolint:errcheck // closing the wrapper does not close the pool
|
|
_, err = p.DownTo(ctx, version)
|
|
return err
|
|
}
|