🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Create index to make sort by starred faster
Deluan47976e13b18a
diff --git a/db/migrations/20201003111749_add_starred_at_index.go b/db/migrations/20201003111749_add_starred_at_index.gonew file mode 100644index 000000000..897f0c081--- /dev/null+++ b/db/migrations/20201003111749_add_starred_at_index.go@@ -0,0 +1,23 @@+package migrations++import (+ "database/sql"++ "github.com/pressly/goose"+)++func init() {+ goose.AddMigration(Up20201003111749, Down20201003111749)+}++func Up20201003111749(tx *sql.Tx) error {+ _, err := tx.Exec(`+create index if not exists annotation_starred_at+ on annotation (starred_at);+ `)+ return err+}++func Down20201003111749(tx *sql.Tx) error {+ return nil+}