Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use unsigned* columns
  • Loading branch information
carusogabriel committed Mar 25, 2018
commit 9ebe101ce464b5feb4ff10bae9fd8414f74cb822
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$table->bigIncrements('id');
$table->string('queue');
$table->longText('payload');
$table->tinyInteger('attempts')->unsigned();
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AddFacebookColumnsToUsersTable extends Migration
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->bigInteger('facebook_user_id')->unsigned()->index();
$table->unsignedBigInteger('facebook_user_id')->index();
$table->string('access_token')->nullable();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AlterActivityNullable extends Migration
public function up()
{
Schema::table('activities', function (Blueprint $table) {
$table->integer('activity_type_id')->unsigned()->nullable()->change();
$table->unsignedInteger('activity_type_id')->nullable()->change();
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class CreateActivityContactTable extends Migration
public function up()
{
Schema::create('activity_contact', function (Blueprint $table) {
$table->integer('activity_id')->unsigned();
$table->integer('contact_id')->unsigned();
$table->unsignedInteger('activity_id');
$table->unsignedInteger('contact_id');

$table->foreign('activity_id')->references('id')->on('activities')->onDelete('cascade');
$table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function up()
{
Schema::create('contact_field_types', function (Blueprint $table) {
$table->increments('id');
$table->integer('account_id')->unsigned();
$table->unsignedInteger('account_id');
$table->string('name');
$table->string('fontawesome_icon')->nullable();
$table->string('protocol')->nullable();
Expand All @@ -28,9 +28,9 @@ public function up()

Schema::create('contact_fields', function (Blueprint $table) {
$table->increments('id');
$table->integer('account_id')->unsigned();
$table->integer('contact_id')->unsigned();
$table->integer('contact_field_type_id')->unsigned();
$table->unsignedInteger('account_id');
$table->unsignedInteger('contact_id');
$table->unsignedInteger('contact_field_type_id');
$table->string('data');
$table->timestamps();

Expand All @@ -41,8 +41,8 @@ public function up()

Schema::create('addresses', function (Blueprint $table) {
$table->increments('id');
$table->integer('account_id')->unsigned();
$table->integer('contact_id')->unsigned();
$table->unsignedInteger('account_id');
$table->unsignedInteger('contact_id');
$table->string('name')->nullable();
$table->string('street')->nullable();
$table->string('city')->nullable();
Expand Down