mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 23:52:31 -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()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('contact', function(Blueprint $table) {
|
Schema::create('contact', function(Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('name');
|
$table->string('name')->nullable();
|
||||||
$table->string('email');
|
$table->string('email')->nullable();
|
||||||
$table->text('message');
|
$table->text('message')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,9 @@ class AddSubscriptionTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('subscriptions', function(Blueprint $table) {
|
Schema::create('subscriptions', function(Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('name');
|
$table->string('name')->nullable();
|
||||||
$table->string('email');
|
$table->string('email')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class AddBlogTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('blog', function(Blueprint $table) {
|
Schema::create('blog', function(Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->bigIncrements('id');
|
||||||
$table->bigInteger('user_id')->unsigned();
|
$table->bigInteger('user_id')->unsigned();
|
||||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||||
$table->string('title')->nullable();
|
$table->string('title')->nullable();
|
||||||
|
|
Loading…
Reference in a new issue