Files
moonwell-core-vanilla/sql/migrations/20171219071309_characters.sql
T
bladez c727e59e39 Refactored petition handling (#1037)
* Now load petitions into memory and manage them directly

* Reworked petition handling to utilize memory stored petitions rather than directly querying the database

* Add support for reloading petitions

* Now store charterguid in DB with petition info

* Now send a valid message when a player has already signed a charter on the same account
Re-added SendPetitionShowList
Corrected debug message formatting

* Reset petition pointer after deletion

* Now delete petitions when charters are deleted

* Add guards to guild mappings

* Forward decl Petition

* Include GuildMgr

* Move Player* constructor of PetitionSignature to TU rather than header

* Include GuildMgr in Item
2017-12-20 17:24:24 +11:00

19 lines
511 B
SQL

DROP PROCEDURE IF EXISTS add_migration;
delimiter ??
CREATE PROCEDURE `add_migration`()
BEGIN
DECLARE v INT DEFAULT 1;
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20171219071309');
IF v=0 THEN
INSERT INTO `migrations` VALUES ('20171219071309');
-- Add your query below.
ALTER TABLE `petition` ADD COLUMN `charterguid` int unsigned UNIQUE COMMENT 'Charter item GUID' AFTER `petitionguid`;
-- End of migration.
END IF;
END??
delimiter ;
CALL add_migration();
DROP PROCEDURE IF EXISTS add_migration;