2013_09_26_022825_comments_settings.php 950 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. class CommentsSettings extends Migration {
  4. /**
  5. * Run the migrations.
  6. *
  7. * @return void
  8. */
  9. public function up()
  10. {
  11. Schema::table('comments', function($table) {
  12. $table->integer('bewertung');
  13. $table->dropColumn('event');
  14. });
  15. Schema::create('news', function($table) {
  16. $table->increments('id');
  17. $table->integer('author');
  18. $table->string('headline');
  19. $table->text('body');
  20. $table->timestamps();
  21. });
  22. Schema::drop('events');
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::table('comments', function($table) {
  32. $table->dropColumn('bewertung');
  33. $table->integer('event');
  34. });
  35. Schema::create('events', function($table) {
  36. $table->increments('id');
  37. $table->string('name');
  38. $table->date('datum');
  39. $table->text('beschreibung');
  40. $table->timestamps();
  41. });
  42. Schema::drop('news');
  43. }
  44. }