Skip to content

Commit

Permalink
Migrations use Exec() directly vs RawQuery()
Browse files Browse the repository at this point in the history
  • Loading branch information
saurori committed Apr 18, 2023
1 parent c85387a commit 85dcc00
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 85dcc00

Please sign in to comment.