Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

migration.php 759B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. }