Keine Beschreibung

2018_07_26_134316_add_phone_numbers_and_extension_to_users_table.php 774B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class AddPhoneNumbersAndExtensionToUsersTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::table('users', function(Blueprint $table)
  13. {
  14. $table->string('office_phone', 20)->after('alternate_email')->nullable();
  15. $table->string('office_extension', 5)->after('office_phone')->nullable();
  16. $table->string('cell_phone', 20)->after('office_extension')->nullable();
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. Schema::table('users', function(Blueprint $table)
  27. {
  28. $table->dropColumn(array('office_phone', 'office_extension', 'cell_phone'));
  29. });
  30. }
  31. }