|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
use yii\db\Migration; |
|
|
|
|
|
use yii\db\Schema; |
|
|
|
|
|
|
|
|
|
|
|
class m161215_100547_table_facture extends Migration |
|
|
|
|
|
{ |
|
|
|
|
|
public function up() |
|
|
|
|
|
{ |
|
|
|
|
|
$this->createTable('facture', [ |
|
|
|
|
|
'id' => 'pk', |
|
|
|
|
|
'id_etablissement' => Schema::TYPE_INTEGER, |
|
|
|
|
|
'date' => Schema::TYPE_DATETIME, |
|
|
|
|
|
'reference' => Schema::TYPE_STRING, |
|
|
|
|
|
'libelle' => Schema::TYPE_STRING, |
|
|
|
|
|
'texte' => Schema::TYPE_TEXT, |
|
|
|
|
|
'montant_ht' => Schema::TYPE_FLOAT, |
|
|
|
|
|
'paye' => Schema::TYPE_BOOLEAN, |
|
|
|
|
|
'date_paiement' => Schema::TYPE_DATETIME, |
|
|
|
|
|
'methode_paiement' => Schema::TYPE_STRING, |
|
|
|
|
|
]); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function down() |
|
|
|
|
|
{ |
|
|
|
|
|
$this->dropTable('facture') ; |
|
|
|
|
|
} |
|
|
|
|
|
} |