mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 09:49:28 +08:00
update migrations
This commit is contained in:
9
main.go
9
main.go
@@ -24,6 +24,7 @@ import (
|
|||||||
"github.com/pocketbase/pocketbase/apis"
|
"github.com/pocketbase/pocketbase/apis"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
"github.com/pocketbase/pocketbase/models"
|
"github.com/pocketbase/pocketbase/models"
|
||||||
|
"github.com/pocketbase/pocketbase/plugins/migratecmd"
|
||||||
"github.com/pocketbase/pocketbase/tools/cron"
|
"github.com/pocketbase/pocketbase/tools/cron"
|
||||||
"github.com/pocketbase/pocketbase/tools/mailer"
|
"github.com/pocketbase/pocketbase/tools/mailer"
|
||||||
"golang.org/x/crypto/ssh"
|
"golang.org/x/crypto/ssh"
|
||||||
@@ -46,10 +47,10 @@ func main() {
|
|||||||
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
|
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
|
||||||
|
|
||||||
// // enable auto creation of migration files when making collection changes in the Admin UI
|
// // enable auto creation of migration files when making collection changes in the Admin UI
|
||||||
// migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
|
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
|
||||||
// // (the isGoRun check is to enable it only during development)
|
// (the isGoRun check is to enable it only during development)
|
||||||
// Automigrate: isGoRun,
|
// Automigrate: isGoRun,
|
||||||
// })
|
})
|
||||||
|
|
||||||
// set auth settings
|
// set auth settings
|
||||||
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
|
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
|
||||||
|
@@ -120,7 +120,7 @@ func init() {
|
|||||||
{
|
{
|
||||||
"id": "ej9oowivz8b2mht",
|
"id": "ej9oowivz8b2mht",
|
||||||
"created": "2024-07-07 16:09:09.179Z",
|
"created": "2024-07-07 16:09:09.179Z",
|
||||||
"updated": "2024-07-15 22:44:12.297Z",
|
"updated": "2024-07-18 15:56:45.302Z",
|
||||||
"name": "system_stats",
|
"name": "system_stats",
|
||||||
"type": "base",
|
"type": "base",
|
||||||
"system": false,
|
"system": false,
|
||||||
@@ -130,7 +130,7 @@ func init() {
|
|||||||
"id": "h9sg148r",
|
"id": "h9sg148r",
|
||||||
"name": "system",
|
"name": "system",
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"required": false,
|
"required": true,
|
||||||
"presentable": false,
|
"presentable": false,
|
||||||
"unique": false,
|
"unique": false,
|
||||||
"options": {
|
"options": {
|
||||||
@@ -146,12 +146,31 @@ func init() {
|
|||||||
"id": "azftn0be",
|
"id": "azftn0be",
|
||||||
"name": "stats",
|
"name": "stats",
|
||||||
"type": "json",
|
"type": "json",
|
||||||
"required": false,
|
"required": true,
|
||||||
"presentable": false,
|
"presentable": false,
|
||||||
"unique": false,
|
"unique": false,
|
||||||
"options": {
|
"options": {
|
||||||
"maxSize": 2000000
|
"maxSize": 2000000
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"system": false,
|
||||||
|
"id": "m1ekhli3",
|
||||||
|
"name": "type",
|
||||||
|
"type": "select",
|
||||||
|
"required": true,
|
||||||
|
"presentable": false,
|
||||||
|
"unique": false,
|
||||||
|
"options": {
|
||||||
|
"maxSelect": 1,
|
||||||
|
"values": [
|
||||||
|
"1m",
|
||||||
|
"10m",
|
||||||
|
"20m",
|
||||||
|
"120m",
|
||||||
|
"480m"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"indexes": [
|
"indexes": [
|
||||||
@@ -167,7 +186,7 @@ func init() {
|
|||||||
{
|
{
|
||||||
"id": "juohu4jipgc13v7",
|
"id": "juohu4jipgc13v7",
|
||||||
"created": "2024-07-07 16:09:57.976Z",
|
"created": "2024-07-07 16:09:57.976Z",
|
||||||
"updated": "2024-07-15 22:44:12.297Z",
|
"updated": "2024-07-18 15:57:50.933Z",
|
||||||
"name": "container_stats",
|
"name": "container_stats",
|
||||||
"type": "base",
|
"type": "base",
|
||||||
"system": false,
|
"system": false,
|
||||||
@@ -177,7 +196,7 @@ func init() {
|
|||||||
"id": "hutcu6ps",
|
"id": "hutcu6ps",
|
||||||
"name": "system",
|
"name": "system",
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"required": false,
|
"required": true,
|
||||||
"presentable": false,
|
"presentable": false,
|
||||||
"unique": false,
|
"unique": false,
|
||||||
"options": {
|
"options": {
|
||||||
@@ -199,6 +218,25 @@ func init() {
|
|||||||
"options": {
|
"options": {
|
||||||
"maxSize": 2000000
|
"maxSize": 2000000
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"system": false,
|
||||||
|
"id": "vo7iuj96",
|
||||||
|
"name": "type",
|
||||||
|
"type": "select",
|
||||||
|
"required": true,
|
||||||
|
"presentable": false,
|
||||||
|
"unique": false,
|
||||||
|
"options": {
|
||||||
|
"maxSelect": 1,
|
||||||
|
"values": [
|
||||||
|
"1m",
|
||||||
|
"10m",
|
||||||
|
"20m",
|
||||||
|
"120m",
|
||||||
|
"480m"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"indexes": [],
|
"indexes": [],
|
||||||
@@ -212,7 +250,7 @@ func init() {
|
|||||||
{
|
{
|
||||||
"id": "_pb_users_auth_",
|
"id": "_pb_users_auth_",
|
||||||
"created": "2024-07-14 16:25:18.226Z",
|
"created": "2024-07-14 16:25:18.226Z",
|
||||||
"updated": "2024-07-17 15:18:01.385Z",
|
"updated": "2024-07-20 00:55:02.071Z",
|
||||||
"name": "users",
|
"name": "users",
|
||||||
"type": "auth",
|
"type": "auth",
|
||||||
"system": false,
|
"system": false,
|
||||||
@@ -266,7 +304,7 @@ func init() {
|
|||||||
"options": {
|
"options": {
|
||||||
"allowEmailAuth": true,
|
"allowEmailAuth": true,
|
||||||
"allowOAuth2Auth": true,
|
"allowOAuth2Auth": true,
|
||||||
"allowUsernameAuth": false,
|
"allowUsernameAuth": true,
|
||||||
"exceptEmailDomains": null,
|
"exceptEmailDomains": null,
|
||||||
"manageRule": null,
|
"manageRule": null,
|
||||||
"minPasswordLength": 8,
|
"minPasswordLength": 8,
|
||||||
|
Reference in New Issue
Block a user