refactor: db code

This commit is contained in:
Simon Ding
2025-04-22 15:39:47 +08:00
parent 26dc488d48
commit 7ccc73e044
8 changed files with 181 additions and 103 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
)
func (c *Client) migrate() error {
func (c *client) migrate() error {
// Run the auto migration tool.
if err := c.ent.Schema.Create(context.Background()); err != nil {
return errors.Wrap(err, "failed creating schema resources")
@@ -20,7 +20,7 @@ func (c *Client) migrate() error {
return nil
}
func (c *Client) migrateIndexerSetting() error {
func (c *client) migrateIndexerSetting() error {
indexers := c.GetAllIndexers()
for _, in := range indexers {