Permalink
Browse files

schema: add back ProjetEvent, removed by mistake

  • Loading branch information...
1 parent 46438f6 commit 2ec1d702b65f4b8e01a26de921dbcee9541f9395 @MichaelMure committed Jan 9, 2012
View
@@ -138,6 +138,23 @@ LienMembreProjet:
Membre: { local: membre_id, foreign: id, type: one }
Projet: { local: projet_id, foreign: id, type: one }
+ProjetEvent:
+ actAs: { Timestampable: ~ }
+ columns:
+ date: { type: date }
+ commentaire: { type: string(4000) }
+ url: { type: string(255) }
+ type_id: { type: integer, notnull: true }
+ membre_id: { type: integer, notnull: true }
+ membreread_id: { type: integer }
+ projet_id: { type: integer, notnull: true }
+ relations:
+ ProjetEventType: { local: type_id, foreign: id, type: one }
+ ProjetEventCom: { local: id, foreign: projet_event_id, type: many }
+ Membre: { local: membre_id, foreign: id, type: one }
+ Membreread: { local: membreread_id, foreign: id, class: Membre, type: one }
+ Projet: { local: projet_id, foreign: id, type: one }
+
ProjetEventType:
columns:
abreviation: { type: string(10) }
View
@@ -4,7 +4,6 @@ CREATE TABLE lien_membre_projet (id BIGINT AUTO_INCREMENT, role VARCHAR(255) NOT
CREATE TABLE membre (id BIGINT AUTO_INCREMENT, username VARCHAR(50) UNIQUE, passwd VARCHAR(50) NOT NULL, numero_etudiant BIGINT, prenom VARCHAR(255) NOT NULL, nom VARCHAR(255) NOT NULL, sexe VARCHAR(255) NOT NULL, date_naissance DATE NOT NULL, ville_naissance VARCHAR(255) NOT NULL, numero_secu VARCHAR(21), promo BIGINT NOT NULL, filiere VARCHAR(255) NOT NULL, poste VARCHAR(50), photo VARCHAR(50), adresse_mulhouse TEXT NOT NULL, cp_mulhouse BIGINT NOT NULL, ville_mulhouse VARCHAR(255) NOT NULL, adresse_parents TEXT, cp_parents BIGINT, ville_parents VARCHAR(255), tel_mobile VARCHAR(255) NOT NULL, tel_fixe VARCHAR(255), email_interne VARCHAR(255), email_externe VARCHAR(255), carte_id TINYINT(1) DEFAULT '0' NOT NULL, just_domicile TINYINT(1) DEFAULT '0' NOT NULL, reglement_interieur TINYINT(1) DEFAULT '0' NOT NULL, convention_etudiant TINYINT(1) DEFAULT '0' NOT NULL, status VARCHAR(255) DEFAULT 'Membre' NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE projet (id BIGINT AUTO_INCREMENT, numero BIGINT NOT NULL, nom VARCHAR(50) NOT NULL, date_debut DATE, date_cloture DATE, commentaire text, budget real, delai_realisation BIGINT, avancement real, qualite real, prospect_id BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME, INDEX prospect_id_idx (prospect_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE projet_event (id BIGINT AUTO_INCREMENT, date DATE, commentaire TEXT, url VARCHAR(255), type_id BIGINT NOT NULL, membre_id BIGINT NOT NULL, membreread_id BIGINT, projet_id BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX type_id_idx (type_id), INDEX membre_id_idx (membre_id), INDEX membreread_id_idx (membreread_id), INDEX projet_id_idx (projet_id), PRIMARY KEY(id)) ENGINE = INNODB;
-CREATE TABLE projet_event_com (id BIGINT AUTO_INCREMENT, date DATE, commentaire TEXT, statut VARCHAR(255), membre_id BIGINT NOT NULL, projet_event_id BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX projet_event_id_idx (projet_event_id), INDEX membre_id_idx (membre_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE projet_event_type (id BIGINT AUTO_INCREMENT, abreviation VARCHAR(10), description VARCHAR(50), ordre BIGINT, obligatoire BIGINT, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE prospect (id BIGINT AUTO_INCREMENT, nom VARCHAR(255) NOT NULL, contact VARCHAR(255), fonction VARCHAR(255), adresse VARCHAR(255), ville VARCHAR(255), cp VARCHAR(255), tel_fixe VARCHAR(255), tel_portable VARCHAR(255), email VARCHAR(255), site_web VARCHAR(255), origine VARCHAR(255), a_rappeler TINYINT(1) DEFAULT '1', date_recontact DATE, commentaire TEXT, activite TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE quittance (id BIGINT AUTO_INCREMENT, membre_id BIGINT NOT NULL, annee BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX membre_id_idx (membre_id), PRIMARY KEY(id)) ENGINE = INNODB;
@@ -20,6 +19,4 @@ ALTER TABLE projet_event ADD CONSTRAINT projet_event_type_id_projet_event_type_i
ALTER TABLE projet_event ADD CONSTRAINT projet_event_projet_id_projet_id FOREIGN KEY (projet_id) REFERENCES projet(id);
ALTER TABLE projet_event ADD CONSTRAINT projet_event_membreread_id_membre_id FOREIGN KEY (membreread_id) REFERENCES membre(id);
ALTER TABLE projet_event ADD CONSTRAINT projet_event_membre_id_membre_id FOREIGN KEY (membre_id) REFERENCES membre(id);
-ALTER TABLE projet_event_com ADD CONSTRAINT projet_event_com_projet_event_id_projet_event_id FOREIGN KEY (projet_event_id) REFERENCES projet_event(id);
-ALTER TABLE projet_event_com ADD CONSTRAINT projet_event_com_membre_id_membre_id FOREIGN KEY (membre_id) REFERENCES membre(id);
ALTER TABLE quittance ADD CONSTRAINT quittance_membre_id_membre_id FOREIGN KEY (membre_id) REFERENCES membre(id);
@@ -38,6 +38,7 @@
* @property Doctrine_Collection $Cotisations
* @property Doctrine_Collection $Quittances
* @property Doctrine_Collection $Contact
+ * @property Doctrine_Collection $ProjetEvent
*
* @method string getUsername() Returns the current record's "username" value
* @method string getPasswd() Returns the current record's "passwd" value
@@ -72,6 +73,7 @@
* @method Doctrine_Collection getCotisations() Returns the current record's "Cotisations" collection
* @method Doctrine_Collection getQuittances() Returns the current record's "Quittances" collection
* @method Doctrine_Collection getContact() Returns the current record's "Contact" collection
+ * @method Doctrine_Collection getProjetEvent() Returns the current record's "ProjetEvent" collection
* @method Membre setUsername() Sets the current record's "username" value
* @method Membre setPasswd() Sets the current record's "passwd" value
* @method Membre setNumeroEtudiant() Sets the current record's "numero_etudiant" value
@@ -105,6 +107,7 @@
* @method Membre setCotisations() Sets the current record's "Cotisations" collection
* @method Membre setQuittances() Sets the current record's "Quittances" collection
* @method Membre setContact() Sets the current record's "Contact" collection
+ * @method Membre setProjetEvent() Sets the current record's "ProjetEvent" collection
*
* @package Annuaire
* @subpackage model
@@ -284,6 +287,10 @@ public function setUp()
'local' => 'id',
'foreign' => 'membre_id'));
+ $this->hasMany('ProjetEvent', array(
+ 'local' => 'id',
+ 'foreign' => 'membre_id'));
+
$timestampable0 = new Doctrine_Template_Timestampable();
$this->actAs($timestampable0);
}
@@ -18,6 +18,7 @@
* @property Prospect $Prospect
* @property Doctrine_Collection $Participants
* @property Doctrine_Collection $LienMembreProjet
+ * @property Doctrine_Collection $ProjetEvent
*
* @method integer getNumero() Returns the current record's "numero" value
* @method string getNom() Returns the current record's "nom" value
@@ -32,6 +33,7 @@
* @method Prospect getProspect() Returns the current record's "Prospect" value
* @method Doctrine_Collection getParticipants() Returns the current record's "Participants" collection
* @method Doctrine_Collection getLienMembreProjet() Returns the current record's "LienMembreProjet" collection
+ * @method Doctrine_Collection getProjetEvent() Returns the current record's "ProjetEvent" collection
* @method Projet setNumero() Sets the current record's "numero" value
* @method Projet setNom() Sets the current record's "nom" value
* @method Projet setDateDebut() Sets the current record's "date_debut" value
@@ -45,6 +47,7 @@
* @method Projet setProspect() Sets the current record's "Prospect" value
* @method Projet setParticipants() Sets the current record's "Participants" collection
* @method Projet setLienMembreProjet() Sets the current record's "LienMembreProjet" collection
+ * @method Projet setProjetEvent() Sets the current record's "ProjetEvent" collection
*
* @package Annuaire
* @subpackage model
@@ -108,6 +111,10 @@ public function setUp()
'local' => 'id',
'foreign' => 'projet_id'));
+ $this->hasMany('ProjetEvent', array(
+ 'local' => 'id',
+ 'foreign' => 'projet_id'));
+
$timestampable0 = new Doctrine_Template_Timestampable();
$softdelete0 = new Doctrine_Template_SoftDelete();
$this->actAs($timestampable0);
@@ -13,35 +13,32 @@
* @property integer $membreread_id
* @property integer $projet_id
* @property ProjetEventType $ProjetEventType
- * @property Doctrine_Collection $ProjetEventCom
* @property Membre $Membre
* @property Membre $Membreread
* @property Projet $Projet
*
- * @method date getDate() Returns the current record's "date" value
- * @method string getCommentaire() Returns the current record's "commentaire" value
- * @method string getUrl() Returns the current record's "url" value
- * @method integer getTypeId() Returns the current record's "type_id" value
- * @method integer getMembreId() Returns the current record's "membre_id" value
- * @method integer getMembrereadId() Returns the current record's "membreread_id" value
- * @method integer getProjetId() Returns the current record's "projet_id" value
- * @method ProjetEventType getProjetEventType() Returns the current record's "ProjetEventType" value
- * @method Doctrine_Collection getProjetEventCom() Returns the current record's "ProjetEventCom" collection
- * @method Membre getMembre() Returns the current record's "Membre" value
- * @method Membre getMembreread() Returns the current record's "Membreread" value
- * @method Projet getProjet() Returns the current record's "Projet" value
- * @method ProjetEvent setDate() Sets the current record's "date" value
- * @method ProjetEvent setCommentaire() Sets the current record's "commentaire" value
- * @method ProjetEvent setUrl() Sets the current record's "url" value
- * @method ProjetEvent setTypeId() Sets the current record's "type_id" value
- * @method ProjetEvent setMembreId() Sets the current record's "membre_id" value
- * @method ProjetEvent setMembrereadId() Sets the current record's "membreread_id" value
- * @method ProjetEvent setProjetId() Sets the current record's "projet_id" value
- * @method ProjetEvent setProjetEventType() Sets the current record's "ProjetEventType" value
- * @method ProjetEvent setProjetEventCom() Sets the current record's "ProjetEventCom" collection
- * @method ProjetEvent setMembre() Sets the current record's "Membre" value
- * @method ProjetEvent setMembreread() Sets the current record's "Membreread" value
- * @method ProjetEvent setProjet() Sets the current record's "Projet" value
+ * @method date getDate() Returns the current record's "date" value
+ * @method string getCommentaire() Returns the current record's "commentaire" value
+ * @method string getUrl() Returns the current record's "url" value
+ * @method integer getTypeId() Returns the current record's "type_id" value
+ * @method integer getMembreId() Returns the current record's "membre_id" value
+ * @method integer getMembrereadId() Returns the current record's "membreread_id" value
+ * @method integer getProjetId() Returns the current record's "projet_id" value
+ * @method ProjetEventType getProjetEventType() Returns the current record's "ProjetEventType" value
+ * @method Membre getMembre() Returns the current record's "Membre" value
+ * @method Membre getMembreread() Returns the current record's "Membreread" value
+ * @method Projet getProjet() Returns the current record's "Projet" value
+ * @method ProjetEvent setDate() Sets the current record's "date" value
+ * @method ProjetEvent setCommentaire() Sets the current record's "commentaire" value
+ * @method ProjetEvent setUrl() Sets the current record's "url" value
+ * @method ProjetEvent setTypeId() Sets the current record's "type_id" value
+ * @method ProjetEvent setMembreId() Sets the current record's "membre_id" value
+ * @method ProjetEvent setMembrereadId() Sets the current record's "membreread_id" value
+ * @method ProjetEvent setProjetId() Sets the current record's "projet_id" value
+ * @method ProjetEvent setProjetEventType() Sets the current record's "ProjetEventType" value
+ * @method ProjetEvent setMembre() Sets the current record's "Membre" value
+ * @method ProjetEvent setMembreread() Sets the current record's "Membreread" value
+ * @method ProjetEvent setProjet() Sets the current record's "Projet" value
*
* @package Annuaire
* @subpackage model
@@ -88,10 +85,6 @@ public function setUp()
'local' => 'type_id',
'foreign' => 'id'));
- $this->hasMany('ProjetEventCom', array(
- 'local' => 'id',
- 'foreign' => 'projet_event_id'));
-
$this->hasOne('Membre', array(
'local' => 'membre_id',
'foreign' => 'id'));
@@ -9,15 +9,18 @@
* @property string $description
* @property integer $ordre
* @property integer $obligatoire
+ * @property Doctrine_Collection $ProjetEvent
*
- * @method string getAbreviation() Returns the current record's "abreviation" value
- * @method string getDescription() Returns the current record's "description" value
- * @method integer getOrdre() Returns the current record's "ordre" value
- * @method integer getObligatoire() Returns the current record's "obligatoire" value
- * @method ProjetEventType setAbreviation() Sets the current record's "abreviation" value
- * @method ProjetEventType setDescription() Sets the current record's "description" value
- * @method ProjetEventType setOrdre() Sets the current record's "ordre" value
- * @method ProjetEventType setObligatoire() Sets the current record's "obligatoire" value
+ * @method string getAbreviation() Returns the current record's "abreviation" value
+ * @method string getDescription() Returns the current record's "description" value
+ * @method integer getOrdre() Returns the current record's "ordre" value
+ * @method integer getObligatoire() Returns the current record's "obligatoire" value
+ * @method Doctrine_Collection getProjetEvent() Returns the current record's "ProjetEvent" collection
+ * @method ProjetEventType setAbreviation() Sets the current record's "abreviation" value
+ * @method ProjetEventType setDescription() Sets the current record's "description" value
+ * @method ProjetEventType setOrdre() Sets the current record's "ordre" value
+ * @method ProjetEventType setObligatoire() Sets the current record's "obligatoire" value
+ * @method ProjetEventType setProjetEvent() Sets the current record's "ProjetEvent" collection
*
* @package Annuaire
* @subpackage model
@@ -48,6 +51,8 @@ public function setTableDefinition()
public function setUp()
{
parent::setUp();
-
+ $this->hasMany('ProjetEvent', array(
+ 'local' => 'id',
+ 'foreign' => 'type_id'));
}
}

0 comments on commit 2ec1d70

Please sign in to comment.