fix queries

This commit is contained in:
finn 2022-03-01 16:56:56 -08:00
parent 17f823064f
commit 56cc98de30

View file

@ -232,7 +232,7 @@ func moveRecipients(source *sql.DB, dest *sql.DB) error {
} }
// start new rowids one above the current max value // start new rowids one above the current max value
_, err = dest.Exec("SELECT setval(pg_get_serial_sequence('signald_recipients', 'rowid', (SELECT MAX(rowid) FROM signald_recipients)+1);") _, err = dest.Exec("SELECT setval(pg_get_serial_sequence('signald_recipients', 'rowid'), (SELECT MAX(rowid) FROM signald_recipients)+1)")
if err != nil { if err != nil {
return err return err
} }
@ -502,7 +502,7 @@ func moveGroups(source *sql.DB, dest *sql.DB) error {
} }
// start new rowids one above the current max value // start new rowids one above the current max value
_, err = dest.Exec("SELECT setval(pg_get_serial_sequence('signald_groups', 'rowid', (SELECT MAX(rowid) FROM signald_groups)+1);") _, err = dest.Exec("SELECT setval(pg_get_serial_sequence('signald_groups', 'rowid'), (SELECT MAX(rowid) FROM signald_groups)+1)")
if err != nil { if err != nil {
return err return err
} }