X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=upgrade%2Faccount%2F00_account.sql;h=26b08182176412aca9c374d5bdaa565838ad12a4;hb=9082ac5ff97d3f2ed0cf4c428c5e5cfccfef6624;hp=89c8d474300ce609b9f0e31fc1a414a2beef6f34;hpb=1b5926018d2e0659fd7617529b63031a5cb8e531;p=platal.git diff --git a/upgrade/account/00_account.sql b/upgrade/account/00_account.sql index 89c8d47..26b0818 100644 --- a/upgrade/account/00_account.sql +++ b/upgrade/account/00_account.sql @@ -1,3 +1,4 @@ +DROP TABLE IF EXISTS accounts; CREATE TABLE accounts ( # Account identifier and type uid int(6) not null auto_increment, @@ -5,11 +6,13 @@ CREATE TABLE accounts ( # Account type and state type varchar(16) default null, - is_admim bool default false, + is_admin bool default false, state enum('pending', 'active', 'disabled') not null default 'pending', # Access password char(40) default null, + token varchar(32) default null, + weak_password varchar(256) default null, registration_date datetime not null, # Administrative tools @@ -17,25 +20,30 @@ CREATE TABLE accounts ( comment varchar(255) default null, # User settings - name varchar(255) default null, + email varchar(255) default null, + full_name varchar(255) default null, + display_name varchar(255) default null, sex enum('female', 'male') not null default 'male', - mail_format enum('plain', 'html') not null default 'html', + email_format enum('text', 'html') not null default 'html', skin varchar(32) default null, + last_version varchar(16) not null, primary key uid (uid), unique key hruid (hruid), - key name (name), + key full_name (full_name), key state (state), key type (type) -); +) ENGINE=InnoDB, CHARSET=utf8; +DROP TABLE IF EXISTS account_types; CREATE TABLE account_types ( type varchar(16) not null, perms set('mail', 'groups', 'forums', 'list', 'search', 'portal') default '', primary key type (type) -); +) ENGINE=InnoDB, CHARSET=utf8; +DROP TABLE IF EXISTS account_profiles; CREATE TABLE account_profiles ( uid int(6) not null, pid int(6) not null, @@ -44,6 +52,6 @@ CREATE TABLE account_profiles ( primary key id (uid, pid), key uid (uid), key pid (pid) -); +) ENGINE=InnoDB, CHARSET=utf8; # vim:set syntax=mysql: