mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-12-22 09:40:23 -05:00
Set contact and subscription table fields nullable and use bigIncrements for the contact, subscription and blog table ids
This commit is contained in:
parent
2a88427c2f
commit
63021ea93c
3 changed files with 8 additions and 8 deletions
|
@ -14,10 +14,10 @@ class AddContactTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('contact', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->text('message');
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->text('message')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -14,9 +14,9 @@ class AddSubscriptionTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('subscriptions', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class AddBlogTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('blog', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('user_id')->unsigned();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->string('title')->nullable();
|
||||
|
|
Loading…
Reference in a new issue