/usr/share/ratbox-services/database/schema-mysql.sql is in ratbox-services-mysql 1.2.4+repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | -- $Id: schema-mysql.txt 23894 2007-05-01 17:24:07Z leeh $
CREATE TABLE users (
id INTEGER AUTO_INCREMENT,
username VARCHAR(10) NOT NULL,
password VARCHAR(35) NOT NULL,
email VARCHAR(100),
suspender VARCHAR(30),
suspend_reason VARCHAR(200),
suspend_time INT UNSIGNED DEFAULT '0',
reg_time INT UNSIGNED,
last_time INT UNSIGNED,
flags INT UNSIGNED,
verify_token VARCHAR(8),
language VARCHAR(255) DEFAULT '',
PRIMARY KEY(id)
);
ALTER TABLE users ADD UNIQUE(username);
CREATE TABLE users_resetpass (
username VARCHAR(10) NOT NULL,
token VARCHAR(10),
time INTEGER,
PRIMARY KEY(username)
);
ALTER TABLE users_resetpass ADD INDEX (time);
CREATE TABLE users_resetemail (
username VARCHAR(10) NOT NULL,
token VARCHAR(10),
email VARCHAR(100) DEFAULT NULL,
time INTEGER,
PRIMARY KEY(username)
);
ALTER TABLE users_resetemail ADD INDEX (time);
CREATE TABLE users_sync (
id INTEGER AUTO_INCREMENT,
hook VARCHAR(50) NOT NULL,
data TEXT,
PRIMARY KEY(id)
);
CREATE TABLE nicks (
nickname VARCHAR(9) NOT NULL,
username VARCHAR(10) NOT NULL,
reg_time INT UNSIGNED,
last_time INT UNSIGNED,
flags INT UNSIGNED,
PRIMARY KEY(nickname)
);
CREATE TABLE channels (
chname VARCHAR(200) NOT NULL,
topic VARCHAR(160),
url VARCHAR(100),
createmodes VARCHAR(50),
enforcemodes VARCHAR(50),
tsinfo INT UNSIGNED,
reg_time INT UNSIGNED,
last_time INT UNSIGNED,
flags INT UNSIGNED,
suspender VARCHAR(30),
suspend_reason VARCHAR(200),
suspend_time INT UNSIGNED DEFAULT '0',
PRIMARY KEY(chname)
);
CREATE TABLE channels_dropowner (
chname VARCHAR(200) NOT NULL,
token VARCHAR(10),
time INTEGER,
PRIMARY KEY(chname)
);
ALTER TABLE channels_dropowner ADD INDEX (time);
CREATE TABLE members (
chname VARCHAR(200) NOT NULL,
username VARCHAR(10) NOT NULL,
lastmod VARCHAR(10) NOT NULL,
level INT,
flags INT UNSIGNED,
suspend INT,
PRIMARY KEY(chname, username)
);
ALTER TABLE members ADD INDEX (chname);
ALTER TABLE members ADD INDEX (username);
CREATE TABLE bans (
chname VARCHAR(200) NOT NULL,
mask VARCHAR(84) NOT NULL,
reason VARCHAR(50) NOT NULL,
username VARCHAR(10) NOT NULL,
level INT,
hold INT,
PRIMARY KEY(chname, mask)
);
ALTER TABLE bans ADD INDEX (chname);
CREATE TABLE operbot (
chname VARCHAR(200) NOT NULL,
tsinfo INT UNSIGNED,
oper VARCHAR(30),
PRIMARY KEY(chname)
);
CREATE TABLE operserv (
chname VARCHAR(200) NOT NULL,
tsinfo INT UNSIGNED,
oper VARCHAR(30),
PRIMARY KEY(chname)
);
CREATE TABLE jupes (
servername VARCHAR(63) NOT NULL,
reason VARCHAR(50) NOT NULL,
PRIMARY KEY(servername)
);
CREATE TABLE operbans (
type CHAR(1) NOT NULL,
mask VARCHAR(200) NOT NULL,
reason VARCHAR(50) NOT NULL,
operreason VARCHAR(50),
hold INT UNSIGNED,
create_time INT UNSIGNED,
oper VARCHAR(30),
remove BOOL,
flags INT UNSIGNED,
PRIMARY KEY(type, mask)
);
CREATE TABLE operbans_regexp (
id INTEGER AUTO_INCREMENT,
regex VARCHAR(255) NOT NULL,
reason VARCHAR(50) NOT NULL,
hold INTEGER,
create_time INTEGER,
oper VARCHAR(30),
PRIMARY KEY(id)
);
CREATE TABLE operbans_regexp_neg (
id INTEGER AUTO_INCREMENT,
parent_id INTEGER NOT NULL,
regex VARCHAR(255) NOT NULL,
oper VARCHAR(30) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE global_welcome (
id INTEGER,
text TEXT,
PRIMARY KEY(id)
);
CREATE TABLE email_banned_domain (
domain VARCHAR(255) NOT NULL,
PRIMARY KEY(domain)
);
CREATE TABLE ignore_hosts (
hostname VARCHAR(255) NOT NULL,
oper VARCHAR(30) NOT NULL,
reason VARCHAR(255) NOT NULL,
PRIMARY KEY(hostname)
);
CREATE TABLE memos(
id INTEGER AUTO_INCREMENT,
user_id INTEGER NOT NULL,
source_id INTEGER NOT NULL,
source VARCHAR(10) NOT NULL,
timestamp INTEGER UNSIGNED DEFAULT '0',
flags INTEGER UNSIGNED DEFAULT '0',
text TEXT,
PRIMARY KEY(id)
);
|