mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 03:10:32 -06:00
Add soft deletes.
This commit is contained in:
parent
cc111d14b0
commit
d774cde109
@ -32,6 +32,7 @@ class CreateAccountsTable extends Migration
|
||||
'accounts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('account_type_id')->unsigned();
|
||||
$table->string('name', 100);
|
||||
|
@ -32,6 +32,7 @@ class CreateComponentsTable extends Migration
|
||||
'components', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('name', 50);
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->string('class', 20);
|
||||
|
@ -38,10 +38,10 @@ class CreatePiggybanksTable extends Migration
|
||||
$table->date('startdate')->nullable();
|
||||
$table->date('targetdate')->nullable();
|
||||
$table->boolean('repeats');
|
||||
$table->enum('rep_length', ['day', 'week','quarter', 'month', 'year'])->nullable();
|
||||
$table->enum('rep_length', ['day', 'week', 'quarter', 'month', 'year'])->nullable();
|
||||
$table->smallInteger('rep_every')->unsigned();
|
||||
$table->smallInteger('rep_times')->unsigned()->nullable();
|
||||
$table->enum('reminder', ['day', 'week','quarter', 'month', 'year'])->nullable();
|
||||
$table->enum('reminder', ['day', 'week', 'quarter', 'month', 'year'])->nullable();
|
||||
$table->smallInteger('reminder_skip')->unsigned();
|
||||
$table->boolean('remind_me');
|
||||
$table->integer('order')->unsigned();
|
||||
|
@ -32,6 +32,7 @@ class CreateTransactionTypesTable extends Migration
|
||||
'transaction_types', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('type', 50);
|
||||
}
|
||||
);
|
||||
|
@ -32,6 +32,7 @@ class CreateTransactionJournalsTable extends Migration
|
||||
'transaction_journals', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('transaction_type_id')->unsigned();
|
||||
$table->integer('recurring_transaction_id')->unsigned()->nullable();
|
||||
|
@ -32,6 +32,7 @@ class CreateTransactionsTable extends Migration
|
||||
'transactions', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('account_id')->unsigned();
|
||||
$table->integer('piggybank_id')->nullable()->unsigned();
|
||||
$table->integer('transaction_journal_id')->unsigned();
|
||||
|
@ -27,6 +27,7 @@ class Transactiongroups extends Migration
|
||||
'transaction_groups', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->enum('relation', ['balance']);
|
||||
|
||||
|
@ -31,11 +31,12 @@ class Transactiongroupsjoin extends Migration
|
||||
$table->integer('transaction_group_id')->unsigned();
|
||||
$table->integer('transaction_journal_id')->unsigned();
|
||||
|
||||
$table->foreign('transaction_group_id','tr_grp_id')->references('id')->on('transaction_groups')->onDelete('cascade');
|
||||
$table->foreign('transaction_journal_id','tr_trj_id')->references('id')->on('transaction_journals')->onDelete('cascade');
|
||||
$table->foreign('transaction_group_id', 'tr_grp_id')->references('id')->on('transaction_groups')->onDelete('cascade');
|
||||
$table->foreign('transaction_journal_id', 'tr_trj_id')->references('id')->on('transaction_journals')->onDelete('cascade');
|
||||
|
||||
$table->unique(['transaction_group_id','transaction_journal_id'],'tt_joined');
|
||||
});
|
||||
$table->unique(['transaction_group_id', 'transaction_journal_id'], 'tt_joined');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user