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.

42 line
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. }