暂无描述

2015_02_20_190057_add_is_first_login_to_users_table.php 546B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class AddIsFirstLoginToUsersTable 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->boolean('is_first_login')->default(true);
  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. {
  26. $table->dropColumn('is_first_login');
  27. });
  28. }
  29. }