mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-02-15 19:20:42 +01:00
The `database/sql` package in the Go stdlib has two methods that can run queries against the database driver: `Query` and `Exec`. When the query returns rows, such as "SELECT", the package expects the use of `Query`, and returns `*sql.Rows`. When the query does not return rows, the package expects the use of `Exec`, which returns `sql.Result`. This changeset corrects the "media_attachments" migration to using `ExecContext`, as "ALTER TABLE" does not return rows. Signed-off-by: Terin Stock <terinjokes@gmail.com>