-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsteps_23.go
37 lines (34 loc) · 1000 Bytes
/
steps_23.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2017 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package upgrades
// stateStepsFor23 returns upgrade steps for Juju 2.3.0 that manipulate state directly.
func stateStepsFor23() []Step {
return []Step{
&upgradeStep{
description: "add a 'type' field to model documents",
targets: []Target{DatabaseMaster},
run: func(context Context) error {
return context.State().AddModelType()
},
},
&upgradeStep{
description: "migrate old leases",
targets: []Target{DatabaseMaster},
run: func(context Context) error {
return context.State().MigrateLeasesToGlobalTime()
},
},
}
}
// stateStepsFor231 returns upgrade steps for Juju 2.3.1 that manipulate state directly.
func stateStepsFor231() []Step {
return []Step{
&upgradeStep{
description: "add status to relations",
targets: []Target{DatabaseMaster},
run: func(context Context) error {
return context.State().AddRelationStatus()
},
},
}
}