use executescript on migration files

This commit is contained in:
Sky Johnson 2025-08-25 14:20:56 -05:00
parent 08a4a2c99f
commit 44c823a1ae

View File

@ -172,7 +172,7 @@ func (m *Migrator) Run() error {
fmt.Printf("Running migration %d: %s\n", migration.Number, migration.Name)
// Execute the migration SQL
if err := sqlitex.Execute(conn, migration.Content, nil); err != nil {
if err := sqlitex.ExecuteScript(conn, migration.Content, nil); err != nil {
return fmt.Errorf("failed to execute migration %d (%s): %w",
migration.Number, migration.Name, err)
}