createTable('commande', [ 'id' => 'pk', 'id_user' => Schema::TYPE_INTEGER . ' NOT NULL', 'date' => Schema::TYPE_DATETIME.' NOT NULL', 'date_update' => Schema::TYPE_DATETIME, 'id_point_vente' => Schema::TYPE_INTEGER . ' NOT NULL', 'id_production' => Schema::TYPE_INTEGER . ' NOT NULL', ]); $this->createTable('commande_produit', [ 'id' => 'pk', 'id_commande' => Schema::TYPE_INTEGER . ' NOT NULL', 'id_produit' => Schema::TYPE_INTEGER . ' NOT NULL', 'quantite' => Schema::TYPE_FLOAT . ' NOT NULL', ]); } public function down() { $this->dropTable('commande'); $this->dropTable('commande_produit'); } }