summaryrefslogtreecommitdiffstats
path: root/database_mysql.sql
diff options
context:
space:
mode:
authorLiam Jack <cuonic@cuonic.com>2015-11-06 15:19:28 +0100
committerLiam Jack <cuonic@cuonic.com>2015-11-06 15:19:28 +0100
commit6e76a7c7102dfb9046701776a76302bbc4690da4 (patch)
tree23ae8c9093e6a17e15e4d4c9864fa98d4124b2d2 /database_mysql.sql
parent7aa2e287f940787a25e59c86a5aa54d512097a89 (diff)
downloadPHPAuth-6e76a7c7102dfb9046701776a76302bbc4690da4.zip
PHPAuth-6e76a7c7102dfb9046701776a76302bbc4690da4.tar.gz
PHPAuth-6e76a7c7102dfb9046701776a76302bbc4690da4.tar.bz2
Moved to password validation with zxcvbn, updated config table layout (ID was useless) and updated test suite
Diffstat (limited to 'database_mysql.sql')
-rw-r--r--database_mysql.sql105
1 files changed, 52 insertions, 53 deletions
diff --git a/database_mysql.sql b/database_mysql.sql
index 346a6bc..ea24901 100644
--- a/database_mysql.sql
+++ b/database_mysql.sql
@@ -1,57 +1,10 @@
--- Adminer 4.2.0 MySQL dump
+-- Adminer 4.2.2 MySQL dump
-SET NAMES utf8mb4;
+SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
-DROP TABLE IF EXISTS `config`;
-CREATE TABLE `config` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `setting` varchar(100) NOT NULL,
- `value` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
-
-INSERT INTO `config` (`id`, `setting`, `value`) VALUES
-(1, 'site_name', 'PHPAuth'),
-(2, 'site_url', 'https://github.com/PHPAuth/PHPAuth'),
-(3, 'site_email', 'no-reply@phpauth.cuonic.com'),
-(4, 'site_key', 'fghuior.)/!/jdUkd8s2!7HVHG7777ghg'),
-(5, 'site_timezone', 'Europe/Paris'),
-(6, 'site_activation_page', 'activate'),
-(7, 'site_password_reset_page', 'reset'),
-(8, 'cookie_name', 'authID'),
-(9, 'cookie_path', '/'),
-(10, 'cookie_domain', NULL),
-(11, 'cookie_secure', '0'),
-(12, 'cookie_http', '0'),
-(13, 'cookie_remember', '+1 month'),
-(14, 'cookie_forget', '+30 minutes'),
-(15, 'bcrypt_cost', '10'),
-(16, 'table_attempts', 'attempts'),
-(17, 'table_requests', 'requests'),
-(18, 'table_sessions', 'sessions'),
-(19, 'table_users', 'users'),
-(20, 'smtp', '0'),
-(21, 'smtp_host', 'smtp.example.com'),
-(22, 'smtp_auth', '1'),
-(23, 'smtp_username', 'email@example.com'),
-(24, 'smtp_password', 'password'),
-(25, 'smtp_port', '25'),
-(26, 'smtp_security', NULL),
-(27, 'verify_password_min_length', '3'),
-(28, 'verify_password_max_length', '150'),
-(29, 'verify_password_strong_requirements', '1'),
-(30, 'verify_email_min_length', '5'),
-(31, 'verify_email_max_length', '100'),
-(32, 'verify_email_use_banlist', '1'),
-(33, 'attack_mitigation_time', '+30 minutes'),
-(34, 'attempts_before_verify', '5'),
-(35, 'attempts_before_ban', '30'),
-(36, 'emailmessage_suppress_activation', '0'),
-(37, 'emailmessage_suppress_reset', '0');
-
DROP TABLE IF EXISTS `attempts`;
CREATE TABLE `attempts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -60,6 +13,52 @@ CREATE TABLE `attempts` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS `config`;
+CREATE TABLE `config` (
+ `setting` varchar(100) NOT NULL,
+ `value` varchar(100) DEFAULT NULL,
+ UNIQUE KEY `setting` (`setting`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+INSERT INTO `config` (`setting`, `value`) VALUES
+('attack_mitigation_time', '+30 minutes'),
+('attempts_before_ban', '30'),
+('attempts_before_verify', '5'),
+('bcrypt_cost', '10'),
+('cookie_domain', NULL),
+('cookie_forget', '+30 minutes'),
+('cookie_http', '0'),
+('cookie_name', 'authID'),
+('cookie_path', '/'),
+('cookie_remember', '+1 month'),
+('cookie_secure', '0'),
+('emailmessage_suppress_activation', '0'),
+('emailmessage_suppress_reset', '0'),
+('password_min_score', '3'),
+('site_activation_page', 'activate'),
+('site_email', 'no-reply@phpauth.cuonic.com'),
+('site_key', 'fghuior.)/!/jdUkd8s2!7HVHG7777ghg'),
+('site_name', 'PHPAuth'),
+('site_password_reset_page', 'reset'),
+('site_timezone', 'Europe/Paris'),
+('site_url', 'https://github.com/PHPAuth/PHPAuth'),
+('smtp', '0'),
+('smtp_auth', '1'),
+('smtp_host', 'smtp.example.com'),
+('smtp_password', 'password'),
+('smtp_port', '25'),
+('smtp_security', NULL),
+('smtp_username', 'email@example.com'),
+('table_attempts', 'attempts'),
+('table_requests', 'requests'),
+('table_sessions', 'sessions'),
+('table_users', 'users'),
+('verify_email_max_length', '100'),
+('verify_email_min_length', '5'),
+('verify_email_use_banlist', '1'),
+('verify_password_min_length', '3');
+
DROP TABLE IF EXISTS `requests`;
CREATE TABLE `requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -68,7 +67,7 @@ CREATE TABLE `requests` (
`expire` datetime NOT NULL,
`type` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `sessions`;
@@ -81,7 +80,7 @@ CREATE TABLE `sessions` (
`agent` varchar(200) NOT NULL,
`cookie_crc` varchar(40) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `users`;
@@ -92,7 +91,7 @@ CREATE TABLE `users` (
`isactive` tinyint(1) NOT NULL DEFAULT '0',
`dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--- 2015-05-08 20:15:43
+-- 2015-11-06 14:09:37