· 8 years ago · May 16, 2018, 06:28 PM
1/* Admins */
2
3DROP TABLE IF EXISTS admins;
4
5CREATE TABLE admins (
6 PRIMARY KEY (aid),
7 aid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
8 last_access DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
9 last_update DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
10 expires TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
11 expiration_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
12 security_question_id INT UNSIGNED NOT NULL DEFAULT 0,
13 security_question_answer VARCHAR(100) NOT NULL DEFAULT '',
14 avatar VARCHAR(255) NOT NULL DEFAULT '',
15 fname VARCHAR(64) NOT NULL DEFAULT '',
16 lname VARCHAR(64) NOT NULL DEFAULT '',
17 email VARCHAR(100) NOT NULL DEFAULT '',
18 receive_notifications SET(
19 'invoice',
20 'outofstock',
21 'signup',
22 'security',
23 'product_review',
24 'notactive',
25 'pwdchange30',
26 'pwdchange60',
27 'pwdchange90',
28 'pwdchangenever',
29 'recurring',
30 'custom_forms'
31 ) NOT NULL DEFAULT '',
32 username VARCHAR(100) NOT NULL DEFAULT '',
33 password VARCHAR(64) NOT NULL DEFAULT '',
34 password_change_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
35 session_id VARCHAR(100) NOT NULL DEFAULT '',
36 rights SET(
37 'all',
38 'demo',
39 'categories',
40 'products',
41 'users',
42 'orders',
43 'emails',
44 'admins',
45 'global',
46 'business',
47 'content',
48 'database',
49 'stats',
50 'marketing',
51 'ccs',
52 'recurring',
53 'support'
54 ) NOT NULL DEFAULT '',
55 active ENUM('Yes', 'No', 'Block') NOT NULL DEFAULT 'Yes',
56 password_history TEXT NOT NULL,
57 login_errors TINYINT UNSIGNED NOT NULL DEFAULT 0,
58 preferences TEXT NOT NULL,
59 openid VARCHAR(250) NOT NULL DEFAULT '',
60 openid_provider VARCHAR(250) NOT NULL DEFAULT '',
61 force_password_change TINYINT NOT NULL DEFAULT 0)
62 ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT COLLATE utf8_general_ci;