Friendly, easy, lightweight, self-hostable CAPTCHA service. https://captcheck.netsyms.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

database.sql 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. -- MySQL Script generated by MySQL Workbench
  2. -- Fri 09 Jun 2017 01:26:04 PM MDT
  3. -- Model: New Model Version: 1.0
  4. -- MySQL Workbench Forward Engineering
  5. SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
  6. SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
  7. SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
  8. -- -----------------------------------------------------
  9. -- Schema captcheck
  10. -- -----------------------------------------------------
  11. -- -----------------------------------------------------
  12. -- Schema captcheck
  13. -- -----------------------------------------------------
  14. CREATE SCHEMA IF NOT EXISTS `captcheck` DEFAULT CHARACTER SET utf8 ;
  15. USE `captcheck` ;
  16. -- -----------------------------------------------------
  17. -- Table `captcheck`.`answers`
  18. -- -----------------------------------------------------
  19. CREATE TABLE IF NOT EXISTS `captcheck`.`answers` (
  20. `aid` INT NOT NULL AUTO_INCREMENT,
  21. `aname` VARCHAR(45) NOT NULL,
  22. `aimg` VARCHAR(45) NOT NULL,
  23. PRIMARY KEY (`aid`),
  24. UNIQUE INDEX `aid_UNIQUE` (`aid` ASC))
  25. ENGINE = InnoDB;
  26. -- -----------------------------------------------------
  27. -- Table `captcheck`.`sessions`
  28. -- -----------------------------------------------------
  29. CREATE TABLE IF NOT EXISTS `captcheck`.`sessions` (
  30. `sid` INT NOT NULL AUTO_INCREMENT,
  31. `skey` VARCHAR(60) NOT NULL,
  32. `aid` INT NOT NULL,
  33. `expired` TINYINT(1) NOT NULL DEFAULT 0,
  34. `timestamp` DATETIME NOT NULL,
  35. `ipaddr` VARCHAR(45) NULL,
  36. PRIMARY KEY (`sid`),
  37. UNIQUE INDEX `sid_UNIQUE` (`sid` ASC),
  38. INDEX `fk_sessions_answers1_idx` (`aid` ASC),
  39. CONSTRAINT `fk_sessions_answers1`
  40. FOREIGN KEY (`aid`)
  41. REFERENCES `captcheck`.`answers` (`aid`)
  42. ON DELETE NO ACTION
  43. ON UPDATE NO ACTION)
  44. ENGINE = InnoDB;
  45. -- -----------------------------------------------------
  46. -- Table `captcheck`.`scrambled_answers`
  47. -- -----------------------------------------------------
  48. CREATE TABLE IF NOT EXISTS `captcheck`.`scrambled_answers` (
  49. `sid` INT NOT NULL,
  50. `aid` INT NOT NULL,
  51. `acode` VARCHAR(20) NOT NULL,
  52. INDEX `fk_sessions_has_answers_answers1_idx` (`aid` ASC),
  53. INDEX `fk_sessions_has_answers_sessions1_idx` (`sid` ASC),
  54. CONSTRAINT `fk_sessions_has_answers_sessions1`
  55. FOREIGN KEY (`sid`)
  56. REFERENCES `captcheck`.`sessions` (`sid`)
  57. ON DELETE NO ACTION
  58. ON UPDATE NO ACTION,
  59. CONSTRAINT `fk_sessions_has_answers_answers1`
  60. FOREIGN KEY (`aid`)
  61. REFERENCES `captcheck`.`answers` (`aid`)
  62. ON DELETE NO ACTION
  63. ON UPDATE NO ACTION)
  64. ENGINE = InnoDB;
  65. SET SQL_MODE=@OLD_SQL_MODE;
  66. SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
  67. SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
  68. -- -----------------------------------------------------
  69. -- Data for table `captcheck`.`answers`
  70. -- -----------------------------------------------------
  71. START TRANSACTION;
  72. USE `captcheck`;
  73. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (1, 'heart', 'heart');
  74. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (2, 'envelope', 'envelope');
  75. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (3, 'building', 'building');
  76. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (4, 'camera', 'camera');
  77. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (5, 'cloud', 'cloud');
  78. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (6, 'circle', 'circle');
  79. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (7, 'girl', 'female');
  80. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (8, 'boy', 'male');
  81. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (9, 'paper', 'file-o');
  82. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (10, 'smartphone', 'mobile');
  83. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (11, 'moon', 'moon-o');
  84. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (12, 'pencil', 'pencil');
  85. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (13, 'paint brush', 'paint-brush');
  86. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (14, 'airplane', 'plane');
  87. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (15, 'printer', 'print');
  88. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (16, 'puzzle piece', 'puzzle-piece');
  89. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (17, 'picture', 'picture-o');
  90. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (18, 'sun', 'sun-o');
  91. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (19, 'star', 'star');
  92. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (20, 'square', 'square');
  93. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (21, 'tree', 'tree');
  94. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (22, 'umbrella', 'umbrella');
  95. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (23, 'snowflake', 'snowflake-o');
  96. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (24, 'basket', 'shopping-basket');
  97. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (25, 'globe', 'globe');
  98. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (26, 'flag', 'flag');
  99. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (27, 'cube', 'cube');
  100. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (28, 'lightning', 'bolt');
  101. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (29, 'truck', 'truck');
  102. INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (30, 'gear', 'cog');
  103. COMMIT;