2016_08_14_123836_add_users_table.php 633 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class AddUsersTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::table('users', function (Blueprint $table) {
  14. $table->string('user_pic')->default('')->comment('博客用户头像');
  15. });
  16. }
  17. /**
  18. * Reverse the migrations.
  19. *
  20. * @return void
  21. */
  22. public function down()
  23. {
  24. Schema::table('users', function (Blueprint $table) {
  25. $table->dropColumn('user_pic');
  26. });
  27. }
  28. }