From: Pierre Habouzit (MadCoder Date: Sun, 19 Jun 2005 21:39:14 +0000 (+0000) Subject: be complete wrt INTs X-Git-Tag: xorg/old~34 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a64b3573e4d716711f66ae0713fca8b8edcb8225;p=platal.git be complete wrt INTs git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-730 --- diff --git a/upgrade/0.9.7/00_xnet.sql b/upgrade/0.9.7/00_xnet.sql index e99e126..e12f9d7 100644 --- a/upgrade/0.9.7/00_xnet.sql +++ b/upgrade/0.9.7/00_xnet.sql @@ -1,15 +1,15 @@ -ALTER TABLE groupex.asso ADD `pub` ENUM( 'public', 'private' ) DEFAULT 'public' NOT NULL AFTER `ax` ; -ALTER TABLE groupex.evenements_participants ADD PRIMARY KEY (eid, item_id, uid); -ALTER TABLE groupex.evenements_participants ADD paid FLOAT DEFAULT 0 NOT NULL; ALTER TABLE virtual CHANGE `type` `type` ENUM('user', 'list', 'dom', 'evt') DEFAULT 'user' NOT NULL; + +ALTER TABLE groupex.asso ADD `pub` ENUM( 'public', 'private' ) DEFAULT 'public' NOT NULL AFTER `ax` ; + DROP TABLE groupex.evenements; CREATE TABLE groupex.evenements ( - `eid` int(8) unsigned NOT NULL auto_increment, - `asso_id` int(8) unsigned NOT NULL default '0', - `organisateur_uid` int(8) unsigned NOT NULL default '0', + `eid` int unsigned NOT NULL auto_increment, + `asso_id` int unsigned NOT NULL default '0', + `organisateur_uid` int unsigned NOT NULL default '0', `intitule` varchar(100) NOT NULL default '', `short_name` varchar(30) NOT NULL default '', - `paiement_id` int(8) unsigned default NULL, + `paiement_id` int unsigned default NULL, `descriptif` text NOT NULL, `debut` datetime NOT NULL default '0000-00-00 00:00:00', `fin` datetime default NULL, @@ -17,6 +17,26 @@ CREATE TABLE groupex.evenements ( `advertise` tinyint(1) NOT NULL default '0', `show_participants` tinyint(1) NOT NULL default '0', PRIMARY KEY (`eid`) -) TYPE=MyISAM; +); INSERT INTO virtual_domains VALUES ('evts.polytechnique.org'); +drop table groupex.evenements_items; +CREATE TABLE `evenements_items` ( + `eid` int unsigned NOT NULL default '0', + `item_id` int unsigned NOT NULL default '0', + `titre` varchar(100) NOT NULL default '', + `details` text NOT NULL, + `montant` decimal(10,2) NOT NULL default '0.00', + PRIMARY KEY (`eid`,`item_id`) +); + +drop table evenements_participants; +CREATE TABLE `evenements_participants` ( + `eid` int unsigned NOT NULL default '0', + `uid` int unsigned NOT NULL default '0', + `item_id` int NOT NULL default '0', + `nb` int NOT NULL default '0', + `paid` float NOT NULL default '0', + PRIMARY KEY (`eid`,`item_id`,`uid`) +); +