From 85dcc000f4a29ff0b113ce21ac807a442576dd3a Mon Sep 17 00:00:00 2001 From: Stefan Aurori Date: Tue, 18 Apr 2023 14:01:21 -0400 Subject: [PATCH] Migrations use Exec() directly vs RawQuery() --- file_migrator.go | 2 +- migration_box.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/file_migrator.go b/file_migrator.go index 64169038..fe9202b9 100644 --- a/file_migrator.go +++ b/file_migrator.go @@ -37,7 +37,7 @@ func NewFileMigrator(path string, c *Connection) (FileMigrator, error) { if content == "" { return nil } - err = tx.RawQuery(content).Exec() + _, err = tx.Store.Exec(content) if err != nil { return fmt.Errorf("error executing %s, sql: %s: %w", mf.Path, content, err) } diff --git a/migration_box.go b/migration_box.go index 76c8ee31..7184f7cc 100644 --- a/migration_box.go +++ b/migration_box.go @@ -33,7 +33,7 @@ func NewMigrationBox(fsys fs.FS, c *Connection) (MigrationBox, error) { if content == "" { return nil } - err = tx.RawQuery(content).Exec() + _, err = tx.Store.Exec(content) if err != nil { return fmt.Errorf("error executing %s, sql: %s: %w", mf.Path, content, err) }