-
Notifications
You must be signed in to change notification settings - Fork 568
/
v2.1.0.go
22 lines (19 loc) · 926 Bytes
/
v2.1.0.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package clusterstate
import (
"context"
"github.com/pachyderm/pachyderm/v2/src/internal/migrations"
"github.com/pachyderm/pachyderm/v2/src/internal/storage/fileset"
enterpriseserver "github.com/pachyderm/pachyderm/v2/src/server/enterprise/server"
)
var state_2_1_0 migrations.State = state_2_0_0.
Apply("Move EnterpriseConfig from etcd -> postgres", func(ctx context.Context, env migrations.Env) error {
return enterpriseserver.EnterpriseConfigPostgresMigration(ctx, env.Tx, env.EtcdClient)
}).
Apply("Remove old EnterpriseConfig record from etcd", func(ctx context.Context, env migrations.Env) error {
return enterpriseserver.DeleteEnterpriseConfigFromEtcd(ctx, env.EtcdClient)
}).
Apply("create pfs cache v1", func(ctx context.Context, env migrations.Env) error {
return fileset.CreatePostgresCacheV1(ctx, env.Tx)
}, migrations.Squash)
// DO NOT MODIFY THIS STATE
// IT HAS ALREADY SHIPPED IN A RELEASE