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.

34 lines
581 B

5 years ago
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. class AlterSettingsTable extends Migration {
  4. /**
  5. * Run the migrations.
  6. *
  7. * @return void
  8. */
  9. public function up()
  10. {
  11. Schema::table('settings', function ($table) {
  12. $table->renameColumn('key', 'setting_key');
  13. $table->renameColumn('value', 'setting_value');
  14. });
  15. }
  16. /**
  17. * Reverse the migrations.
  18. *
  19. * @return void
  20. */
  21. public function down()
  22. {
  23. Schema::table('settings', function ($table) {
  24. $table->renameColumn('setting_key', 'key');
  25. $table->renameColumn('setting_value', 'value');
  26. });
  27. }
  28. }