You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 satır
694B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. class m161205_125942_point_vente_acces_restreint extends Migration
  5. {
  6. public function up()
  7. {
  8. $this->addColumn('point_vente', 'acces_restreint', Schema::TYPE_BOOLEAN.' DEFAULT 0') ;
  9. $this->createTable('point_vente_user', [
  10. 'id_point_vente' => Schema::TYPE_INTEGER.' NOT NULL',
  11. 'id_user' => Schema::TYPE_INTEGER.' NOT NULL',
  12. ]);
  13. $this->addPrimaryKey('point_vente_user_pk', 'point_vente_user', ['id_point_vente', 'id_user']);
  14. }
  15. public function down()
  16. {
  17. $this->dropColumn('point_vente', 'acces_restreint') ;
  18. $this->dropTable('point_vente_user') ;
  19. }
  20. }