mirror of
https://github.com/certimate-go/certimate.git
synced 2026-08-30 18:01:43 +08:00
fix: #1137
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
"github.com/samber/lo"
|
||||
@@ -18,7 +19,10 @@ import (
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1757476800_m0.4.0_migrate.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1757476800_m0.4.0_migrate.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1375,10 +1379,10 @@ func init() {
|
||||
app.DB().NewQuery(`UPDATE workflow_run SET graph=REPLACE(graph, '"id":"_', '"id":"')`).Execute()
|
||||
|
||||
app.DB().NewQuery(`UPDATE workflow_output SET nodeId=SUBSTR(nodeId, 2) WHERE nodeId LIKE '-%'`).Execute()
|
||||
app.DB().NewQuery(`UPDATE workflow_output SET nodeId=SUBSTR(nodeId, 2) WHERE nodeId LIKE '_%'`).Execute()
|
||||
app.DB().NewQuery(`UPDATE workflow_output SET nodeId=SUBSTR(nodeId, 2) WHERE nodeId LIKE '\_%' ESCAPE '\'`).Execute()
|
||||
|
||||
app.DB().NewQuery(`UPDATE workflow_logs SET nodeId=SUBSTR(nodeId, 2) WHERE nodeId LIKE '-%'`).Execute()
|
||||
app.DB().NewQuery(`UPDATE workflow_logs SET nodeId=SUBSTR(nodeId, 2) WHERE nodeId LIKE '_%'`).Execute()
|
||||
app.DB().NewQuery(`UPDATE workflow_logs SET nodeId=SUBSTR(nodeId, 2) WHERE nodeId LIKE '\_%' ESCAPE '\'`).Execute()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,13 +4,17 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1757476801_m0.4.0_initialize.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1757476801_m0.4.0_initialize.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
|
||||
@@ -9,7 +10,10 @@ import (
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1760486400_m0.4.1.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1760486400_m0.4.1.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
|
||||
@@ -9,7 +10,10 @@ import (
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1762142400_m0.4.3.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1762142400_m0.4.3.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1762516800_app_v0.4.4.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1762516800_m0.4.4.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
|
||||
@@ -9,7 +10,10 @@ import (
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1763373600_m0.4.5.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1763373600_m0.4.5.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
|
||||
@@ -9,7 +10,10 @@ import (
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
if mr, _ := app.FindFirstRecordByFilter("_migrations", "file='1763640000_m0.4.6.go'"); mr != nil {
|
||||
if err := app.DB().
|
||||
NewQuery("SELECT (1) FROM _migrations WHERE file={:file} LIMIT 1").
|
||||
Bind(dbx.Params{"file": "1763640000_m0.4.6.go"}).
|
||||
One(&struct{}{}); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ func init() {
|
||||
"1762142400_m0.4.3.go",
|
||||
"1762516800_m0.4.4.go",
|
||||
"1763373600_m0.4.5.go",
|
||||
"1763553600_m0.4.6.go",
|
||||
"1763640000_m0.4.6.go",
|
||||
}
|
||||
for _, name := range migrations {
|
||||
|
||||
Reference in New Issue
Block a user