Skip to content

Commit

Permalink
Fix migration error
Browse files Browse the repository at this point in the history
  • Loading branch information
ymhuang0808 committed Mar 22, 2016
1 parent fb0e11e commit ffd0b08
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CreateProjectsTable extends Migration
*/
public function up()
{
Schema::create('projects', function (Blueprint $table) {
Schema::create('projects', function(Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->text('description');
Expand All @@ -30,6 +30,6 @@ public function up()
*/
public function down()
{
//
Schema::drop('projects');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class CreateProjectHyperlinksTable extends Migration
public function up()
{
Schema::create('project_hyperlinks', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->integer('project_id')->unsigned();
$table->integer('hyperlink_id')->unsigned();
$table->bigInteger('hyperlink_id')->unsigned();

$table->foreign('project_id')->references('id')
->on('projects')->onDelete('cascade')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CreateProjectVolunteersTable extends Migration
public function up()
{
Schema::create('project_volunteers', function(Blueprint $table) {
$table->increments(id);
$table->increments('id');
$table->integer('project_id')->unsigned();
$table->integer('volunteer_id')->unsigned();
$table->smallInteger('status');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProcessHyprlinksTable extends Migration
Expand All @@ -9,10 +10,10 @@ class CreateProcessHyprlinksTable extends Migration
*/
public function up()
{
Schema::create('process_hyperlinks', function (Blueprint $table) {
$table->increments('id');
Schema::create('process_hyperlinks', function(Blueprint $table) {
$table->bigIncrements('id');
$table->integer('process_id')->unsigned();
$table->integer('hyperlink_id')->unsigned();
$table->bigInteger('hyperlink_id')->unsigned();

$table->foreign('process_id')->references('id')
->on('processes')->onDelete('cascade')
Expand Down

0 comments on commit ffd0b08

Please sign in to comment.