|
- <?php
-
- use yii\db\Migration;
- use yii\db\Schema;
-
- class m171226_200642_tables_developpement extends Migration {
-
- public function up() {
- $this->createTable('developpement', [
- 'id' => 'pk',
- 'objet' => Schema::TYPE_STRING . ' NOT NULL',
- 'description' => Schema::TYPE_TEXT,
- 'date' => Schema::TYPE_DATETIME . ' NOT NULL',
- 'avancement' => Schema::TYPE_INTEGER . ' DEFAULT 0',
- 'statut' => Schema::TYPE_STRING . ' DEFAULT \'open\'',
- 'type' => Schema::TYPE_STRING . ' DEFAULT \'evolution\'',
- 'estimation_temps' => Schema::TYPE_FLOAT,
- 'date_livraison' => Schema::TYPE_DATE
- ]);
-
- $this->createTable('developpement_priorite', [
- 'id_etablissement' => Schema::TYPE_INTEGER . ' NOT NULL',
- 'id_developpement' => Schema::TYPE_INTEGER . ' NOT NULL',
- 'PRIMARY KEY (`id_user`, `id_developpement`)'
- ]);
- }
-
- public function down() {
- $this->dropTable('developpement') ;
- $this->dropTable('developpement_priorite') ;
- }
- }
|