add Achievement condition ?qrcode? to trigger Achievements by scanning a QR-code (implements #126)

This commit is contained in:
oliver 2016-03-12 19:19:20 +01:00
commit 4d6e95f81e
12 changed files with 319 additions and 35 deletions

View file

@ -100,6 +100,27 @@ CREATE TABLE `achievementconditions_date` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `achievementconditions_qrcode`
--
DROP TABLE IF EXISTS `achievementconditions_qrcode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `achievementconditions_qrcode` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_user_id` int(11) NOT NULL,
`achievement_id` int(11) NOT NULL,
`hash` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `created_user_id` (`created_user_id`),
KEY `achievement_id` (`achievement_id`),
CONSTRAINT `achievementconditions_qrcode_ibfk_1` FOREIGN KEY (`created_user_id`) REFERENCES `users` (`id`),
CONSTRAINT `achievementconditions_qrcode_ibfk_2` FOREIGN KEY (`achievement_id`) REFERENCES `achievements` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `achievementconditions_quest`
--