This repository has been archived by the owner on Apr 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.sql
96 lines (80 loc) · 3.76 KB
/
users.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
-- Table structure for table `ci_sessions`
--
DROP TABLE IF EXISTS `ci_sessions`;
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`session_id` varchar(40) COLLATE utf8_bin NOT NULL DEFAULT '0',
`ip_address` varchar(16) COLLATE utf8_bin NOT NULL DEFAULT '0',
`user_agent` varchar(150) COLLATE utf8_bin NOT NULL,
`last_activity` int(10) unsigned NOT NULL DEFAULT '0',
`user_data` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `login_attempts`
--
DROP TABLE IF EXISTS `login_attempts`;
CREATE TABLE IF NOT EXISTS `login_attempts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ip_address` varchar(40) COLLATE utf8_bin NOT NULL,
`login` varchar(50) COLLATE utf8_bin NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `user_autologin`
--
DROP TABLE IF EXISTS `user_autologin`;
CREATE TABLE IF NOT EXISTS `user_autologin` (
`key_id` char(32) COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL DEFAULT '0',
`user_agent` varchar(150) COLLATE utf8_bin NOT NULL,
`last_ip` varchar(40) COLLATE utf8_bin NOT NULL,
`last_login` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`key_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `user_profiles`
--
DROP TABLE IF EXISTS `user_profiles`;
CREATE TABLE IF NOT EXISTS `user_profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`country` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`website` varchar(255) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE utf8_bin NOT NULL,
`password` varchar(255) COLLATE utf8_bin NOT NULL,
`email` varchar(100) COLLATE utf8_bin NOT NULL,
`type` tinyint(1) NOT NULL DEFAULT '2',
`activated` tinyint(1) NOT NULL DEFAULT '1',
`banned` tinyint(1) NOT NULL DEFAULT '0',
`ban_reason` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`new_password_key` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`new_password_requested` datetime DEFAULT NULL,
`new_email` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`new_email_key` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`last_ip` varchar(40) COLLATE utf8_bin NOT NULL,
`last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `users` (`username`, `email`, `password`, `type`, `created`) VALUES
('TAG boss', 'boss@example.com', '$2a$08$MLB0liGy9Ef2Wcaue5PzjuhyV3Qw64U0TlHvxP0SWWJCk/.FmAfqa', 1, '2012-11-20 12:00:00'),
('Jonas P', 'Jonas@example.com', '$2a$08$0TKkbqKT1KlrVoIMRuHhb.Fo.dmJNQHq4RWuF1vfkw4KmpyQN6/Ca', 2, '2012-11-20 12:01:00'),
('Petras P', 'Petras@example.com', '$2a$08$0TKkbqKT1KlrVoIMRuHhb.Fo.dmJNQHq4RWuF1vfkw4KmpyQN6/Ca', 2, '2012-11-20 12:02:00'),
('Zigmas R', 'Zigmas@example.com', '$2a$08$0TKkbqKT1KlrVoIMRuHhb.Fo.dmJNQHq4RWuF1vfkw4KmpyQN6/Ca', 2, '2012-11-26 13:36:00');