Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

33 rindas
1.1KB

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. class m171226_200642_tables_developpement extends Migration {
  5. public function up() {
  6. $this->createTable('developpement', [
  7. 'id' => 'pk',
  8. 'objet' => Schema::TYPE_STRING . ' NOT NULL',
  9. 'description' => Schema::TYPE_TEXT,
  10. 'date' => Schema::TYPE_DATETIME . ' NOT NULL',
  11. 'avancement' => Schema::TYPE_INTEGER . ' DEFAULT 0',
  12. 'statut' => Schema::TYPE_STRING . ' DEFAULT \'open\'',
  13. 'type' => Schema::TYPE_STRING . ' DEFAULT \'evolution\'',
  14. 'estimation_temps' => Schema::TYPE_FLOAT,
  15. 'date_livraison' => Schema::TYPE_DATE
  16. ]);
  17. $this->createTable('developpement_priorite', [
  18. 'id_etablissement' => Schema::TYPE_INTEGER . ' NOT NULL',
  19. 'id_developpement' => Schema::TYPE_INTEGER . ' NOT NULL',
  20. 'PRIMARY KEY (`id_etablissement`, `id_developpement`)'
  21. ]);
  22. }
  23. public function down() {
  24. $this->dropTable('developpement') ;
  25. $this->dropTable('developpement_priorite') ;
  26. }
  27. }