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

42 行
759B

  1. <?php
  2. /**
  3. * This view is used by console/controllers/MigrateController.php
  4. * The following variables are available in this view:
  5. */
  6. /* @var $className string the new migration class name without namespace */
  7. /* @var $namespace string the new migration class namespace */
  8. echo "<?php\n";
  9. if (!empty($namespace)) {
  10. echo "\nnamespace {$namespace};\n";
  11. }
  12. ?>
  13. use yii\db\Migration;
  14. class <?= $className ?> extends Migration
  15. {
  16. public function up()
  17. {
  18. }
  19. public function down()
  20. {
  21. echo "<?= $className ?> cannot be reverted.\n";
  22. return false;
  23. }
  24. /*
  25. // Use safeUp/safeDown to run migration code within a transaction
  26. public function safeUp()
  27. {
  28. }
  29. public function safeDown()
  30. {
  31. }
  32. */
  33. }