您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

35 行
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. }