Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateUsersDevicesTable extends Migration {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up() {
- Schema::create('users_devices', function (Blueprint $table) {
- $table->increments('id');
- $table->unsignedInteger("user_id");
- $table->text("device_id");
- $table->string("platform", 20)->nullable();
- $table->string("model", 30)->nullable();
- $table->string("uuid", 150)->nullable();
- $table->string("manufacturer", 20)->nullable();
- $table->string("version", 10)->nullable();
- $table->timestamp('created_at');
- $table->foreign('user_id', 'users_devices_user_id_foreign')->references('id')->on('users');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down() {
- Schema::dropIfExists('users_devices');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement