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.

35 satır
634B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. class m201207_164410_specific_prices_percent extends Migration
  5. {
  6. public function safeUp()
  7. {
  8. $this->addColumn('product_price', 'percent', Schema::TYPE_INTEGER) ;
  9. }
  10. public function safeDown()
  11. {
  12. $this->dropColumn('product_price', 'percent') ;
  13. return false;
  14. }
  15. /*
  16. // Use up()/down() to run migration code without a transaction.
  17. public function up()
  18. {
  19. }
  20. public function down()
  21. {
  22. echo "m201207_164410_specific_prices_percent cannot be reverted.\n";
  23. return false;
  24. }
  25. */
  26. }