mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add column checks prior to drops
This commit is contained in:
parent
0b0128fb41
commit
974aabe87e
@ -821,13 +821,15 @@ class SubscriptionService
|
|||||||
$invoice->is_proforma = false;
|
$invoice->is_proforma = false;
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
|
|
||||||
|
// 29-06-2023 handle webhooks for payment intent - user may not be present.
|
||||||
|
|
||||||
$context = [
|
$context = [
|
||||||
'context' => 'change_plan',
|
'context' => 'change_plan',
|
||||||
'recurring_invoice' => $recurring_invoice->hashed_id,
|
'recurring_invoice' => $recurring_invoice->hashed_id,
|
||||||
'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id),
|
'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id),
|
||||||
'client' => $recurring_invoice->client->hashed_id,
|
'client' => $recurring_invoice->client->hashed_id,
|
||||||
'subscription' => $this->subscription->hashed_id,
|
'subscription' => $this->subscription->hashed_id,
|
||||||
'contact' => auth()->guard('contact')->user()->hashed_id,
|
'contact' => auth()->guard('contact')->user()?->hashed_id ?? $recurring_invoice->client->contacts()->first()->hashed_id,
|
||||||
'account_key' => $recurring_invoice->client->custom_value2,
|
'account_key' => $recurring_invoice->client->custom_value2,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -25,9 +25,12 @@ return new class extends Migration
|
|||||||
Language::create(['id' => 38, 'name' => 'Khmer', 'locale' => 'km_KH']);
|
Language::create(['id' => 38, 'name' => 'Khmer', 'locale' => 'km_KH']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Schema::hasColumn('companies', 'enable_e_invoice'))
|
||||||
|
{
|
||||||
Schema::table('companies', function (Blueprint $table) {
|
Schema::table('companies', function (Blueprint $table) {
|
||||||
$table->dropColumn('enable_e_invoice');
|
$table->dropColumn('enable_e_invoice');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Company::query()->cursor()->each(function ($company){
|
Company::query()->cursor()->each(function ($company){
|
||||||
$company->tax_data = new TaxModel();
|
$company->tax_data = new TaxModel();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user