Initial
This commit is contained in:
commit
97dc0a3570
78 files changed
+7054
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package jitsi
|
||||
|
||||
import "goAuth/internal/migration"
|
||||
|
||||
func Migrations() []migration.Migration {
|
||||
return []migration.Migration{
|
||||
{
|
||||
Version: 1,
|
||||
SQL: `CREATE TABLE IF NOT EXISTS jitsi_room_history (
|
||||
user_id INTEGER NOT NULL,
|
||||
room_name TEXT NOT NULL,
|
||||
last_joined_at TEXT NOT NULL,
|
||||
PRIMARY KEY (user_id, room_name),
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
);`,
|
||||
},
|
||||
{
|
||||
Version: 2,
|
||||
SQL: `CREATE INDEX IF NOT EXISTS idx_jitsi_history_user_joined
|
||||
ON jitsi_room_history(user_id, last_joined_at DESC);`,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user