be complete wrt INTs
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Sun, 19 Jun 2005 21:39:14 +0000 (21:39 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:21 +0000 (23:29 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-730

upgrade/0.9.7/00_xnet.sql

index e99e126..e12f9d7 100644 (file)
@@ -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`)
+);
+