increments('id'); $table->timestamps(); $table->integer('user_id')->unsigned(); $table->string('name'); $table->text('data'); // connect preferences to users $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); // only one preference per name per user $table->unique(['user_id', 'name']); } ); } }