From 0470403b71c5bd296bafffd82dfa2d501be7ce3a Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 3 Aug 2022 11:30:06 -0700 Subject: [PATCH] Function has been re-exported for use --- core/data/messages.go | 14 +++++++------- core/data/migrations.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/data/messages.go b/core/data/messages.go index 047917ec7..cce63fb6d 100644 --- a/core/data/messages.go +++ b/core/data/messages.go @@ -24,15 +24,15 @@ func CreateMessagesTable(db *sql.DB) { "link" TEXT, PRIMARY KEY (id) );` - mustExec(createTableSQL, db) + MustExec(createTableSQL, db) // Create indexes - mustExec(`CREATE INDEX IF NOT EXISTS user_id_hidden_at_timestamp ON messages (id, user_id, hidden_at, timestamp);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_id ON messages (id);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_user_id ON messages (user_id);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_hidden_at ON messages (hidden_at);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_timestamp ON messages (timestamp);`, db) - mustExec(`CREATE INDEX IF NOT EXISTS idx_messages_hidden_at_timestamp on messages(hidden_at, timestamp);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS user_id_hidden_at_timestamp ON messages (id, user_id, hidden_at, timestamp);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_id ON messages (id);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_user_id ON messages (user_id);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_hidden_at ON messages (hidden_at);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_timestamp ON messages (timestamp);`, db) + MustExec(`CREATE INDEX IF NOT EXISTS idx_messages_hidden_at_timestamp on messages(hidden_at, timestamp);`, db) } // GetMessagesCount will return the number of messages in the database. diff --git a/core/data/migrations.go b/core/data/migrations.go index c7d14b975..817010bff 100644 --- a/core/data/migrations.go +++ b/core/data/migrations.go @@ -48,7 +48,7 @@ func migrateToSchema6(db *sql.DB) { // Fix chat messages table schema. Since chat is ephemeral we can drop // the table and recreate it. // Drop the old messages table - mustExec(`DROP TABLE messages`, db) + MustExec(`DROP TABLE messages`, db) // Recreate it CreateMessagesTable(db)