Skip to content

Commit

Permalink
Merge pull request #820 from saurori/migration-exec
Browse files Browse the repository at this point in the history
Migrations use Exec() directly vs RawQuery()
  • Loading branch information
sio4 authored Apr 26, 2023
2 parents c85387a + 85dcc00 commit 01ebd5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion file_migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion migration_box.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 01ebd5b

Please sign in to comment.