Simplifies profile names handling.
[platal.git] / upgrade / 0.9.7 / 00_xnet.sql
1 ALTER TABLE virtual CHANGE `type` `type` ENUM('user', 'list', 'dom', 'evt') DEFAULT 'user' NOT NULL;
2
3 ALTER TABLE groupex.asso ADD `pub` ENUM( 'public', 'private' ) DEFAULT 'public' NOT NULL AFTER `ax` ;
4 INSERT INTO virtual_domains VALUES ('evts.polytechnique.org');
5
6 use groupex;
7
8 DROP TABLE IF EXISTS groupex.evenements;
9 CREATE TABLE groupex.evenements (
10 `eid` int unsigned NOT NULL auto_increment,
11 `asso_id` int unsigned NOT NULL default '0',
12 `organisateur_uid` int unsigned NOT NULL default '0',
13 `intitule` varchar(100) NOT NULL default '',
14 `short_name` varchar(30) NOT NULL default '',
15 `paiement_id` int unsigned default NULL,
16 `descriptif` text NOT NULL,
17 `debut` datetime NOT NULL default '0000-00-00 00:00:00',
18 `fin` datetime default NULL,
19 `membres_only` tinyint(1) NOT NULL default '0',
20 `advertise` tinyint(1) NOT NULL default '0',
21 `show_participants` tinyint(1) NOT NULL default '0',
22 PRIMARY KEY (`eid`)
23 );
24
25 drop table IF EXISTS evenements_items;
26 CREATE TABLE evenements_items (
27 `eid` int unsigned NOT NULL default '0',
28 `item_id` int unsigned NOT NULL default '0',
29 `titre` varchar(100) NOT NULL default '',
30 `details` text NOT NULL,
31 `montant` decimal(10,2) NOT NULL default '0.00',
32 PRIMARY KEY (`eid`,`item_id`)
33 );
34
35 drop table IF EXISTS evenements_participants;
36 CREATE TABLE evenements_participants (
37 `eid` int unsigned NOT NULL default '0',
38 `uid` int unsigned NOT NULL default '0',
39 `item_id` int NOT NULL default '0',
40 `nb` int NOT NULL default '0',
41 `paid` float NOT NULL default '0',
42 PRIMARY KEY (`eid`,`item_id`,`uid`)
43 );
44