Added something fancy called "virtual balance".

This commit is contained in:
James Cole
2015-04-01 19:42:14 +02:00
parent a80b7aac6c
commit 7f5188f5a4
9 changed files with 24 additions and 11 deletions

View File

@@ -32,6 +32,7 @@ class ChangesForV336 extends Migration
Schema::table(
'accounts', function (Blueprint $table) {
$table->string('name', 255)->change();
$table->dropColumn('virtual_balance');
// recreate foreign key
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
@@ -94,6 +95,7 @@ class ChangesForV336 extends Migration
Schema::table(
'accounts', function (Blueprint $table) {
$table->text('name')->change();
$table->decimal('virtual_balance',10,2)->default(0);
$table->foreign('user_id', 'account_user_id')->references('id')->on('users')->onDelete('cascade');
}
);