mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-23 20:52:36 +00:00
Fixed mute command not working after next map (fixes #110)
* this is due to a type issue
This commit is contained in:
parent
5327c47e30
commit
8c58482efb
2 changed files with 26 additions and 1 deletions
|
@ -62,7 +62,7 @@ CREATE TABLE IF NOT EXISTS `mute` (
|
|||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
`victim_id` INTEGER NOT NULL,
|
||||
`invoker_id` INTEGER NOT NULL,
|
||||
`type` TEXT NOT NULL,
|
||||
`type` INTEGER NOT NULL,
|
||||
`issued` INTEGER NOT NULL,
|
||||
`expires` INTEGER NOT NULL,
|
||||
`duration` INTEGER NOT NULL,
|
||||
|
|
|
@ -1,2 +1,27 @@
|
|||
-- rename 'incognito' permission to 'noaka'
|
||||
UPDATE `player_permission` SET `permission`='noaka' WHERE `permission`='incognito';
|
||||
|
||||
-- fix mute type column type
|
||||
ALTER TABLE `mute` RENAME TO `mute_old`;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `mute` (
|
||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
`victim_id` INTEGER NOT NULL,
|
||||
`invoker_id` INTEGER NOT NULL,
|
||||
`type` INTEGER NOT NULL,
|
||||
`issued` INTEGER NOT NULL,
|
||||
`expires` INTEGER NOT NULL,
|
||||
`duration` INTEGER NOT NULL,
|
||||
`reason` TEXT NOT NULL,
|
||||
CONSTRAINT `mute_victim` FOREIGN KEY (`victim_id`) REFERENCES `player` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
||||
CONSTRAINT `mute_invoker` FOREIGN KEY (`invoker_id`) REFERENCES `player` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS `mute_victim_idx` ON `mute` (`victim_id`);
|
||||
CREATE INDEX IF NOT EXISTS `mute_invoker_idx` ON `mute` (`invoker_id`);
|
||||
|
||||
INSERT INTO `mute` (`id`, `victim_id`, `invoker_id`, `type`, `issued`, `expires`, `duration`, `reason`)
|
||||
SELECT `id`, `victim_id`, `invoker_id`, `type`, `issued`, `expires`, `duration`, `reason`
|
||||
FROM `mute_old`;
|
||||
|
||||
DROP TABLE `mute_old`;
|
||||
|
|
Loading…
Reference in a new issue