diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-07 01:06:55 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-07 01:18:35 +0300 |
commit | 420e049415c8ec7f7a209a03110eecbe0c83e9e0 (patch) | |
tree | e93f7faf8c9704daa24c2653ca50b4f222fa2305 /cmd/bun/migrations | |
parent | 0617918eb941c401b687d4a0dbc2a54c19e06fd1 (diff) |
Мелкие правки
Diffstat (limited to 'cmd/bun/migrations')
-rw-r--r-- | cmd/bun/migrations/20241005143542_1_init.go | 27 | ||||
-rw-r--r-- | cmd/bun/migrations/main.go | 7 |
2 files changed, 0 insertions, 34 deletions
diff --git a/cmd/bun/migrations/20241005143542_1_init.go b/cmd/bun/migrations/20241005143542_1_init.go deleted file mode 100644 index dc92797..0000000 --- a/cmd/bun/migrations/20241005143542_1_init.go +++ /dev/null @@ -1,27 +0,0 @@ -package migrations - -import ( - "context" - "fmt" - - "github.com/uptrace/bun" - "sh.org.ru/pkg/model" -) - -func init() { - Migrations.MustRegister(func(ctx context.Context, db *bun.DB) error { - fmt.Print(" [up migration] ") - if _, err := db.NewCreateTable().Model((*model.Quote)(nil)).Exec(ctx); err != nil { - return err - } - - return nil - }, func(ctx context.Context, db *bun.DB) error { - fmt.Print(" [down migration] ") - if _, err := db.NewDropTable().Model((*model.Quote)(nil)).Exec(ctx); err != nil { - return err - } - - return nil - }) -} diff --git a/cmd/bun/migrations/main.go b/cmd/bun/migrations/main.go deleted file mode 100644 index f7346fb..0000000 --- a/cmd/bun/migrations/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package migrations - -import ( - "github.com/uptrace/bun/migrate" -) - -var Migrations = migrate.NewMigrations() |