Added unicity to AccountType model. Fixed some tests because of this.

This commit is contained in:
James Cole
2014-08-31 10:03:24 +02:00
parent 58b3334f05
commit 2e342e47a7
4 changed files with 49 additions and 80 deletions

View File

@@ -11,23 +11,6 @@ use Illuminate\Database\Schema\Blueprint;
class CreateAccountTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'account_types', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('type', 50);
$table->boolean('editable');
}
);
}
/**
* Reverse the migrations.
*
@@ -38,4 +21,23 @@ class CreateAccountTypesTable extends Migration
Schema::drop('account_types');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'account_types', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('type', 50);
$table->boolean('editable');
$table->unique('type');
}
);
}
}