Added migrations, yo
This commit is contained in:
@@ -2,3 +2,4 @@ assets: "./assets/"
|
|||||||
port: 8081
|
port: 8081
|
||||||
dbpath: "./data/data.db"
|
dbpath: "./data/data.db"
|
||||||
dbsys: "sqlite3"
|
dbsys: "sqlite3"
|
||||||
|
migrations_path: "file://expenses/db/migrations/"
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Configuration struct {
|
type Configuration struct {
|
||||||
AssetsDir string `yaml:"assets"`
|
AssetsDir string `yaml:"assets"`
|
||||||
Port string `yaml:"port"`
|
Port string `yaml:"port"`
|
||||||
DBSys string `yaml:"dbsys"`
|
DBSys string `yaml:"dbsys"`
|
||||||
DBPath string `yaml:"dbpath"`
|
DBPath string `yaml:"dbpath"`
|
||||||
|
MigrationsPath string `yaml:"migrations_path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"expenses/config"
|
"expenses/config"
|
||||||
"log"
|
"log"
|
||||||
|
mod "expenses/expenses/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -30,5 +31,13 @@ func StartApp() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Serv = NewExpenseService(db)
|
Serv = NewExpenseService(db)
|
||||||
|
|
||||||
|
log.Println(cfg)
|
||||||
|
|
||||||
|
err = mod.RunMigrations(db)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to apply migrations: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
DROP TABLE IF EXISTS expensesShares;
|
||||||
|
DROP TABLE IF EXISTS expensesPayments;
|
||||||
|
DROP TABLE IF EXISTS stores;
|
||||||
|
DROP TABLE IF EXISTS categories;
|
||||||
|
DROP TABLE IF EXISTS expenseTypes;
|
||||||
|
DROP TABLE IF EXISTS users;
|
||||||
|
DROP TABLE IF EXISTS expenses;
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
CREATE TABLE expenses (
|
||||||
|
"ExpID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"Description" text NOT NULL,
|
||||||
|
"Value" float NOT NULL DEFAULT 0,
|
||||||
|
"StoreID" int NOT NULL DEFAULT 0,
|
||||||
|
"CategoryID" int NOT NULL DEFAULT 0,
|
||||||
|
"OwnerUserID" int NOT NULL DEFAULT 0,
|
||||||
|
"TypeID" int NOT NULL DEFAULT 0,
|
||||||
|
"ExpDate" int NOT NULL DEFAULT -1,
|
||||||
|
"CreationDate" int NOT NULL DEFAULT -1,
|
||||||
|
FOREIGN KEY(StoreID) REFERENCES stores(StoreID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(CategoryID) REFERENCES categories(CategoryID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(OwnerUserID) REFERENCES users(UserID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(TypeID) REFERENCES expensetypes(TypeID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE stores(
|
||||||
|
"StoreID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"StoreName" text NOT NULL
|
||||||
|
);
|
||||||
|
-- Create a default store for NoStore
|
||||||
|
INSERT INTO stores (StoreID, StoreName) VALUES(0, 'No Store');
|
||||||
|
|
||||||
|
CREATE TABLE categories(
|
||||||
|
"CategoryID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"CategoryName" text NOT NULL
|
||||||
|
);
|
||||||
|
-- Create a default category for NoCategory
|
||||||
|
INSERT INTO categories (CategoryID, CategoryName) VALUES(0, 'No Category');
|
||||||
|
|
||||||
|
CREATE TABLE "expenseTypes"(
|
||||||
|
"TypeID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"TypeName" text NOT NULL
|
||||||
|
);
|
||||||
|
-- Create a default category for NoCategory
|
||||||
|
INSERT INTO expensetypes (TypeID, TypeName) VALUES(0, 'expense');
|
||||||
|
|
||||||
|
CREATE TABLE users(
|
||||||
|
"UserID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"UserName" text NOT NULL,
|
||||||
|
"UserPass" text NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE "expensesShares"(
|
||||||
|
"ExpShareID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"ExpID" int NOT NULL,
|
||||||
|
"UserID" int NOT NULL,
|
||||||
|
"Share" float NOT NULL DEFAULT 0.5,
|
||||||
|
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE "expensesPayments"(
|
||||||
|
"ExpPaymID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"ExpID" int NOT NULL,
|
||||||
|
"UserID" int NOT NULL,
|
||||||
|
"Payed" float NOT NULL DEFAULT 0,
|
||||||
|
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
-- 0002_change_floats_to_decimal.down.sql
|
||||||
|
|
||||||
|
-- expensesShares
|
||||||
|
CREATE TABLE expensesShares_old (
|
||||||
|
"ExpShareID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"ExpID" int NOT NULL,
|
||||||
|
"UserID" int NOT NULL,
|
||||||
|
"Share" float NOT NULL DEFAULT 0.5,
|
||||||
|
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
INSERT INTO expensesShares_old SELECT * FROM expensesShares;
|
||||||
|
DROP TABLE expensesShares;
|
||||||
|
ALTER TABLE expensesShares_old RENAME TO expensesShares;
|
||||||
|
|
||||||
|
-- expensesPayments
|
||||||
|
CREATE TABLE expensesPayments_old (
|
||||||
|
"ExpPaymID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"ExpID" int NOT NULL,
|
||||||
|
"UserID" int NOT NULL,
|
||||||
|
"Payed" float NOT NULL DEFAULT 0,
|
||||||
|
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
INSERT INTO expensesPayments_old SELECT * FROM expensesPayments;
|
||||||
|
DROP TABLE expensesPayments;
|
||||||
|
ALTER TABLE expensesPayments_old RENAME TO expensesPayments;
|
||||||
|
|
||||||
|
-- expenses
|
||||||
|
CREATE TABLE expenses_old (
|
||||||
|
"ExpID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"Description" text NOT NULL,
|
||||||
|
"Value" float NOT NULL DEFAULT 0,
|
||||||
|
"StoreID" int NOT NULL DEFAULT 0,
|
||||||
|
"CategoryID" int NOT NULL DEFAULT 0,
|
||||||
|
"OwnerUserID" int NOT NULL DEFAULT 0,
|
||||||
|
"TypeID" int NOT NULL DEFAULT 0,
|
||||||
|
"ExpDate" int NOT NULL DEFAULT -1,
|
||||||
|
"CreationDate" int NOT NULL DEFAULT -1,
|
||||||
|
FOREIGN KEY(StoreID) REFERENCES stores(StoreID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(CategoryID) REFERENCES categories(CategoryID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(OwnerUserID) REFERENCES users(UserID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(TypeID) REFERENCES expensetypes(TypeID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
INSERT INTO expenses_old SELECT * FROM expenses;
|
||||||
|
DROP TABLE expenses;
|
||||||
|
ALTER TABLE expenses_old RENAME TO expenses;
|
||||||
|
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
-- 0002_change_floats_to_decimal.up.sql
|
||||||
|
|
||||||
|
-- expensesShares
|
||||||
|
CREATE TABLE expensesShares_new (
|
||||||
|
"ExpShareID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"ExpID" int NOT NULL,
|
||||||
|
"UserID" int NOT NULL,
|
||||||
|
"Share" DECIMAL(10,2) NOT NULL DEFAULT 0.5,
|
||||||
|
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
INSERT INTO expensesShares_new SELECT * FROM expensesShares;
|
||||||
|
DROP TABLE expensesShares;
|
||||||
|
ALTER TABLE expensesShares_new RENAME TO expensesShares;
|
||||||
|
|
||||||
|
-- expensesPayments
|
||||||
|
CREATE TABLE expensesPayments_new (
|
||||||
|
"ExpPaymID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"ExpID" int NOT NULL,
|
||||||
|
"UserID" int NOT NULL,
|
||||||
|
"Payed" DECIMAL(10,2) NOT NULL DEFAULT 0,
|
||||||
|
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
INSERT INTO expensesPayments_new SELECT * FROM expensesPayments;
|
||||||
|
DROP TABLE expensesPayments;
|
||||||
|
ALTER TABLE expensesPayments_new RENAME TO expensesPayments;
|
||||||
|
|
||||||
|
-- expenses
|
||||||
|
CREATE TABLE expenses_new (
|
||||||
|
"ExpID" integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"Description" text NOT NULL,
|
||||||
|
"Value" DECIMAL(10,2) NOT NULL DEFAULT 0,
|
||||||
|
"StoreID" int NOT NULL DEFAULT 0,
|
||||||
|
"CategoryID" int NOT NULL DEFAULT 0,
|
||||||
|
"OwnerUserID" int NOT NULL DEFAULT 0,
|
||||||
|
"TypeID" int NOT NULL DEFAULT 0,
|
||||||
|
"ExpDate" int NOT NULL DEFAULT -1,
|
||||||
|
"CreationDate" int NOT NULL DEFAULT -1,
|
||||||
|
FOREIGN KEY(StoreID) REFERENCES stores(StoreID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(CategoryID) REFERENCES categories(CategoryID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(OwnerUserID) REFERENCES users(UserID) ON DELETE RESTRICT,
|
||||||
|
FOREIGN KEY(TypeID) REFERENCES expensetypes(TypeID) ON DELETE RESTRICT
|
||||||
|
);
|
||||||
|
INSERT INTO expenses_new SELECT * FROM expenses;
|
||||||
|
DROP TABLE expenses;
|
||||||
|
ALTER TABLE expenses_new RENAME TO expenses;
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
DROP TABLE IF EXISTS expenses;
|
|
||||||
CREATE TABLE expenses (
|
|
||||||
"ExpID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"Description" text NOT NULL,
|
|
||||||
"Value" float NOT NULL DEFAULT 0,
|
|
||||||
"StoreID" int NOT NULL DEFAULT 0,
|
|
||||||
"CategoryID" int NOT NULL DEFAULT 0,
|
|
||||||
"OwnerUserID" int NOT NULL DEFAULT 0,
|
|
||||||
"TypeID" int NOT NULL DEFAULT 0,
|
|
||||||
"ExpDate" int NOT NULL DEFAULT -1,
|
|
||||||
"CreationDate" int NOT NULL DEFAULT -1,
|
|
||||||
FOREIGN KEY(StoreID) REFERENCES stores(StoreID) ON DELETE RESTRICT,
|
|
||||||
FOREIGN KEY(CategoryID) REFERENCES categories(CategoryID) ON DELETE RESTRICT,
|
|
||||||
FOREIGN KEY(OwnerUserID) REFERENCES users(UserID) ON DELETE RESTRICT,
|
|
||||||
FOREIGN KEY(TypeID) REFERENCES expensetypes(TypeID) ON DELETE RESTRICT
|
|
||||||
);
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS stores;
|
|
||||||
CREATE TABLE stores(
|
|
||||||
"StoreID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"StoreName" text NOT NULL
|
|
||||||
);
|
|
||||||
-- Create a default store for NoStore
|
|
||||||
INSERT INTO stores (StoreID, StoreName) VALUES(0, 'No Store');
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS categories;
|
|
||||||
CREATE TABLE categories(
|
|
||||||
"CategoryID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"CategoryName" text NOT NULL
|
|
||||||
);
|
|
||||||
-- Create a default category for NoCategory
|
|
||||||
INSERT INTO categories (CategoryID, CategoryName) VALUES(0, 'No Category');
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS expenseTypes;
|
|
||||||
CREATE TABLE "expenseTypes"(
|
|
||||||
"TypeID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"TypeName" text NOT NULL
|
|
||||||
);
|
|
||||||
-- Create a default category for NoCategory
|
|
||||||
INSERT INTO expensetypes (TypeID, TypeName) VALUES(0, 'expense');
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS users;
|
|
||||||
CREATE TABLE users(
|
|
||||||
"UserID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"UserName" text NOT NULL,
|
|
||||||
"UserPass" text NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS expensesShares;
|
|
||||||
CREATE TABLE "expensesShares"(
|
|
||||||
"ExpShareID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"ExpID" int NOT NULL,
|
|
||||||
"UserID" int NOT NULL,
|
|
||||||
"Share" float NOT NULL DEFAULT 0.5,
|
|
||||||
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
|
||||||
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
|
||||||
);
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS expensesPayments;
|
|
||||||
CREATE TABLE "expensesPayments"(
|
|
||||||
"ExpPaymID" integer PRIMARY KEY AUTOINCREMENT,
|
|
||||||
"ExpID" int NOT NULL,
|
|
||||||
"UserID" int NOT NULL,
|
|
||||||
"Payed" float NOT NULL DEFAULT 0,
|
|
||||||
FOREIGN KEY(ExpID) REFERENCES expenses(ExpID) ON DELETE RESTRICT,
|
|
||||||
FOREIGN KEY(UserID) REFERENCES users(UserID) ON DELETE RESTRICT
|
|
||||||
);
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ sql:
|
|||||||
- engine: "sqlite"
|
- engine: "sqlite"
|
||||||
queries: "queries/"
|
queries: "queries/"
|
||||||
# Convert this to use a migrations/ (migrate)
|
# Convert this to use a migrations/ (migrate)
|
||||||
schema: "schema.sql"
|
schema: "migrations/"
|
||||||
gen:
|
gen:
|
||||||
go:
|
go:
|
||||||
package: "repository"
|
package: "repository"
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
import (
|
||||||
|
"database/sql"
|
||||||
|
"expenses/config"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
|
||||||
|
mig "github.com/golang-migrate/migrate/v4"
|
||||||
|
"github.com/golang-migrate/migrate/v4/database/sqlite3"
|
||||||
|
_ "github.com/golang-migrate/migrate/v4/source/file"
|
||||||
|
)
|
||||||
|
|
||||||
|
func RunMigrations(db *sql.DB) error {
|
||||||
|
cfg := config.GetInstance()
|
||||||
|
|
||||||
|
driver, err := sqlite3.WithInstance(db, &sqlite3.Config{})
|
||||||
|
|
||||||
|
m, err := mig.NewWithDatabaseInstance(cfg.MigrationsPath, "sqlite3", driver)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = m.Up()
|
||||||
|
if err != nil {
|
||||||
|
if err == mig.ErrNoChange {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if dirty, ok := err.(mig.ErrDirty); ok {
|
||||||
|
log.Printf("Database is dirty at version %d, cleaning", dirty.Version)
|
||||||
|
|
||||||
|
if ferr := m.Force(dirty.Version); ferr != nil {
|
||||||
|
return fmt.Errorf("failed to force clean state: %w", ferr)
|
||||||
|
}
|
||||||
|
|
||||||
|
if uerr := m.Up(); uerr != nil && uerr != mig.ErrNoChange {
|
||||||
|
return fmt.Errorf("retry migration failed: %w", uerr)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
+9
-5
@@ -4,6 +4,7 @@ go 1.24.4
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gin-gonic/gin v1.10.1
|
github.com/gin-gonic/gin v1.10.1
|
||||||
|
github.com/golang-migrate/migrate/v4 v4.18.3
|
||||||
github.com/mattn/go-sqlite3 v1.14.28
|
github.com/mattn/go-sqlite3 v1.14.28
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
@@ -21,6 +22,8 @@ require (
|
|||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
||||||
github.com/goccy/go-json v0.10.2 // indirect
|
github.com/goccy/go-json v0.10.2 // indirect
|
||||||
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
||||||
github.com/leodido/go-urn v1.4.0 // indirect
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
@@ -31,11 +34,12 @@ require (
|
|||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||||
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
golang.org/x/arch v0.8.0 // indirect
|
golang.org/x/arch v0.8.0 // indirect
|
||||||
golang.org/x/crypto v0.23.0 // indirect
|
golang.org/x/crypto v0.36.0 // indirect
|
||||||
golang.org/x/net v0.25.0 // indirect
|
golang.org/x/net v0.38.0 // indirect
|
||||||
golang.org/x/sys v0.20.0 // indirect
|
golang.org/x/sys v0.31.0 // indirect
|
||||||
golang.org/x/text v0.15.0 // indirect
|
golang.org/x/text v0.23.0 // indirect
|
||||||
google.golang.org/protobuf v1.34.1 // indirect
|
google.golang.org/protobuf v1.34.2 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
+21
-12
@@ -25,9 +25,16 @@ github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBEx
|
|||||||
github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||||
|
github.com/golang-migrate/migrate/v4 v4.18.3 h1:EYGkoOsvgHHfm5U/naS1RP/6PL/Xv3S4B/swMiAmDLs=
|
||||||
|
github.com/golang-migrate/migrate/v4 v4.18.3/go.mod h1:99BKpIi6ruaaXRM1A77eqZ+FWPQ3cfRa+ZVy5bmWMaY=
|
||||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
|
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||||
|
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
|
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||||
|
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
@@ -65,23 +72,25 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
|
|||||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||||
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||||
|
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
||||||
|
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||||
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
|
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
|
||||||
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
|
||||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
|
||||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
|
||||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
|
||||||
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
|
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||||
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
|
|||||||
Reference in New Issue
Block a user