I have no idea what's happening!

This commit is contained in:
Sander Dorigo
2014-11-10 18:38:58 +01:00
parent 754336b3cf
commit a3f8841ec3
25 changed files with 358 additions and 244 deletions

View File

@@ -3,40 +3,41 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateImportentriesTable extends Migration {
class CreateImportentriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('importentries', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('class',200);
$table->integer('importmap_id')->unsigned();
$table->integer('old')->unsigned();
$table->integer('new')->unsigned();
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'importentries', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('class', 200);
$table->integer('importmap_id')->unsigned();
$table->integer('old')->unsigned();
$table->integer('new')->unsigned();
// map import entries to import map.
// connect accounts to account_types
$table->foreign('importmap_id')
->references('id')->on('importmaps')
->onDelete('cascade');
});
}
// connect import map.
$table->foreign('importmap_id')
->references('id')->on('importmaps')
->onDelete('cascade');
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('importentries');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('importentries');
}
}

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAccountMeta extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create(
'account_meta', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('account_id')->unsigned();
$table->string('name');
$table->text('data');
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::drop('account_meta');
}
}