diff --git a/pkg/repository/postgres/postgres.go b/pkg/repository/postgres/postgres.go index f9ffda9..8cb81ef 100644 --- a/pkg/repository/postgres/postgres.go +++ b/pkg/repository/postgres/postgres.go @@ -17,7 +17,7 @@ import ( var ( //go:embed ddl/*.sql - postgresDDLAssets embed.FS + ddlAssets embed.FS //go:embed dml/deleteDeviceByID.sql deleteDeviceByIDSQL string @@ -470,7 +470,7 @@ func (postgres *Postgres) Close() error { // Migrate creates all required tables if not exist func (postgres *Postgres) Migrate(ctx context.Context) error { - sourceDriver, err := iofs.New(postgresDDLAssets, "ddl") + sourceDriver, err := iofs.New(ddlAssets, "ddl") if err != nil { return err } diff --git a/pkg/repository/sqlite3/sqlite.go b/pkg/repository/sqlite3/sqlite.go index 7f11f6e..d87ddb6 100644 --- a/pkg/repository/sqlite3/sqlite.go +++ b/pkg/repository/sqlite3/sqlite.go @@ -19,7 +19,7 @@ import ( var ( //go:embed ddl/*.sql - sqlite3DDLAssets embed.FS + ddlAssets embed.FS //go:embed dml/deleteDeviceByID.sql deleteDeviceByIDSQL string @@ -462,7 +462,7 @@ func (sqlite *SQLite) Migrate(ctx context.Context) error { sqlite.mutex.Lock() defer sqlite.mutex.Unlock() - sourceDriver, err := iofs.New(sqlite3DDLAssets, "ddl") + sourceDriver, err := iofs.New(ddlAssets, "ddl") if err != nil { return err }