Skip to content

Commit

Permalink
fix(seed): correct identifier for the currency
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Jun 1, 2024
1 parent 2b3a71a commit 45e67ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/Database/Seeds/MakeTestUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,32 @@ public function run()

$account_fabricator = new Fabricator(AccountModel::class);
$asset_account = $account_fabricator->setOverrides([
"currency_id" => $currency->id,
"currency_id" => $peso_currency->id,
"name" => "Cash",
"kind" => LIQUID_ASSET_ACCOUNT_KIND
])->create();
$expense_account = $account_fabricator->setOverrides([
"currency_id" => $currency->id,
"currency_id" => $peso_currency->id,
"name" => "Fare",
"kind" => EXPENSE_ACCOUNT_KIND
])->create();
$equity_account = $account_fabricator->setOverrides([
"currency_id" => $currency->id,
"currency_id" => $peso_currency->id,
"name" => "Living Equity",
"kind" => EQUITY_ACCOUNT_KIND
])->create();
$liability_account = $account_fabricator->setOverrides([
"currency_id" => $currency->id,
"currency_id" => $peso_currency->id,
"name" => "Accounts Payable to Friend",
"kind" => LIABILITY_ACCOUNT_KIND
])->create();
$income_account = $account_fabricator->setOverrides([
"currency_id" => $currency->id,
"currency_id" => $peso_currency->id,
"name" => "Service Income",
"kind" => INCOME_ACCOUNT_KIND
])->create();
$closing_account = $account_fabricator->setOverrides([
"currency_id" => $currency->id,
"currency_id" => $peso_currency->id,
"name" => "Revenue and Expenses",
"kind" => INCOME_ACCOUNT_KIND
])->create();
Expand Down
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
"php spark migrate -n \"CodeIgniter\\Settings\"",
"php spark migrate -n \"CodeIgniter\\Shield\"",
"php spark migrate -n \"App\""
],
"seed:initial": [
"php spark migrate:rollback",
"php spark migrate:rollback",
"php spark migrate:rollback",
"composer run migrate:all",
"php spark db:seed MakeTestUser"
]
},
"minimum-stability": "dev",
Expand Down

0 comments on commit 45e67ba

Please sign in to comment.