diff --git a/web/application/migrations/1.php b/web/application/migrations/1.php index b821af7..17946c8 100644 --- a/web/application/migrations/1.php +++ b/web/application/migrations/1.php @@ -17,6 +17,9 @@ DB::query("CREATE TABLE sessions ( random TINYINT(1) )"); +DB::query("CREATE INDEX waiting_idx ON sessions(waiting)"); +DB::query("CREATE INDEX lastping_idx ON sessions(lastPing)"); + DB::query("CREATE TABLE sessionlogs ( id INTEGER PRIMARY KEY $autoIncrement, original_id INTEGER, diff --git a/web/application/migrations/2.php b/web/application/migrations/2.php index ae41490..74ff2e6 100644 --- a/web/application/migrations/2.php +++ b/web/application/migrations/2.php @@ -8,4 +8,7 @@ DB::query("CREATE TABLE messages ( user_to INTEGER, user_from INTEGER, message VARCHAR(255) -)"); \ No newline at end of file +)"); + +DB::query("CREATE INDEX messages_to_idx ON messages(user_to)"); +DB::query("CREATE INDEX messages_from_idx ON messages(user_from)"); \ No newline at end of file