mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-22 01:01:46 +00:00
.github
.vscode
docker
internal
migrations
1724677539_update_admin.go
1726147254_collections_snapshot.go
1726147268_update_access_usage.go
1726184067_collections_snapshot.go
1726299230_collections_snapshot.go
1726569833_updated_domains.go
1726670437_collections_snapshot.go
1727006428_collections_snapshot.go
1727188693_collections_snapshot.go
1727341442_collections_snapshot.go
1728610007_updated_access.go
1728778480_collections_snapshot.go
1729160433_updated_access.go
1729241998_updated_access.go
1729339341_updated_access.go
ui
.dockerignore
.editorconfig
.gitignore
.goreleaser.yml
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTING_EN.md
Dockerfile
LICENSE.md
Makefile
README.md
README_EN.md
go.mod
go.sum
main.go
nixpacks.toml
usage.gif
21 lines
600 B
Go
21 lines
600 B
Go
package migrations
|
|
|
|
import (
|
|
"github.com/pocketbase/dbx"
|
|
m "github.com/pocketbase/pocketbase/migrations"
|
|
)
|
|
|
|
func init() {
|
|
m.Register(func(db dbx.Builder) error {
|
|
// add up queries...
|
|
db.NewQuery("update access set usage='all' where configType in ('aliyun', 'tencent')").Execute()
|
|
db.NewQuery("update access set usage='deploy' where configType in ('ssh', 'webhook','qiniu')").Execute()
|
|
db.NewQuery("update access set usage='apply' where configType in ('cloudflare','namesilo','godaddy')").Execute()
|
|
return nil
|
|
}, func(db dbx.Builder) error {
|
|
// add down queries...
|
|
|
|
return nil
|
|
})
|
|
}
|