Uncomment foreign keys.
[platal.git] / upgrade / 1.0.1 / 12_profiles.sql
CommitLineData
a0fce0c6
SJ
1DROP TABLE IF EXISTS profile_modifications;
2
3CREATE TABLE profile_modifications (
f73d9281
FB
4 pid INT(11) UNSIGNED DEFAULT NULL,
5 uid INT(11) UNSIGNED DEFAULT NULL,
a0fce0c6
SJ
6 field VARCHAR(60) NOT NULL,
7 oldText TEXT NOT NULL,
8 newText TEXT NOT NULL,
9 pub ENUM('private', 'ax', 'public') NOT NULL DEFAULT 'private',
10 PRIMARY KEY(pid, uid, field)
60db728a
SJ
11 FOREIGN KEY (uid) REFERENCES accounts (uid) ON DELETE CASCADE ON UPDATE CASCADE,
12 FOREIGN KEY (pid) REFERENCES profiles (pid) ON DELETE CASCADE ON UPDATE CASCADE
a0fce0c6
SJ
13) ENGINE=InnoDB, CHARSET=utf8;
14
15-- vim:set syntax=mysql: