Skip to content

Commit

Permalink
Correctly handle error in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin authored and deluan committed Apr 12, 2020
1 parent c4eab5d commit 52b8c5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migration/20200131183653_standardize_item_type.go
Expand Up @@ -37,7 +37,7 @@ update annotation set item_type = 'media_file' where item_type = 'mediaFile';
}

func Down20200131183653(tx *sql.Tx) error {
tx.Exec(`
_, err := tx.Exec(`
create table search_dg_tmp
(
id varchar(255) not null
Expand All @@ -59,5 +59,5 @@ create index search_table
update annotation set item_type = 'mediaFile' where item_type = 'media_file';
`)
return nil
return err
}

0 comments on commit 52b8c5f

Please sign in to comment.