Solved rollback problem in create_people_table (foreign key problem).
This commit is contained in:
@@ -45,6 +45,7 @@ class CreatePeopleTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('person_targets');
|
||||
Schema::dropIfExists('people');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,7 @@ class CreatePersonTargetsTable extends Migration
|
||||
// The type of the target. It can be either a payable or a
|
||||
// receivable. A payable is of type 'expediture' and a receivable is
|
||||
// of type 'income'.
|
||||
$table->integer('io_type')->unsigned();
|
||||
$table->foreign('io_type')->references('id')->on('io_types')
|
||||
->onDelete('no action');
|
||||
$table->tinyInteger('io_type');
|
||||
|
||||
// A reference text which describes the target
|
||||
$table->string('reference');
|
||||
|
||||
Reference in New Issue
Block a user