Files
Aurora.3/SQL/migrate-2017/V012__Deleteable_mirrors.sql
Werner a69a7316ab Condense Database Migrations (#17103)
* Condense Database Migrations

Condenses the Database Migrations into a new initial schema.
Also adds some instructions to the Database Readme for existing setups.

* Update readme/delete changed migrations since pr creation

* Reworks a bit how the previous migrations are handled and updates the instructions accordingly

* Expand the readme with baseline/migrate

---------

Co-authored-by: Werner <Arrow768@users.noreply.github.com>
2023-08-19 22:32:13 +02:00

30 lines
585 B
SQL

--
-- Implemented in PR #4026.
-- Adds a deleted_at column for mirrors.
-- Also adds indexes for speeding up search queries around the ban database.
--
ALTER TABLE `ss13_ban_mirrors`
ADD `deleted_at` DATETIME NULL DEFAULT NULL AFTER `extra_info`;
CREATE INDEX `idx_mirrors_isbanned` ON `ss13_ban_mirrors` (
`deleted_at`,
`ckey`,
`ip`,
`computerid`
);
CREATE INDEX `idx_mirrors_select` ON `ss13_ban_mirrors` (
`deleted_at`,
`ban_id`
);
CREATE INDEX `idx_ban_isbanned` ON `ss13_ban` (
`unbanned`,
`bantype`,
`expiration_time`,
`ckey`,
`computerid`,
`ip`
);