database.stub 820B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateSessionsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('sessions', function (Blueprint $table) {
  15. $table->string('id')->unique();
  16. $table->unsignedInteger('user_id')->nullable();
  17. $table->string('ip_address', 45)->nullable();
  18. $table->text('user_agent')->nullable();
  19. $table->text('payload');
  20. $table->integer('last_activity');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists('sessions');
  31. }
  32. }