diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 73c0ba94a012..b81b4a476387 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -771,7 +771,7 @@ class InvoiceController extends BaseController } break; case 'cancel': - $invoice = $invoice->service()->handleCancellation()->deletePdf()->touchPdf()->save(); + $invoice = $invoice->service()->handleCancellation()->touchPdf()->save(); if (! $bulk) { $this->itemResponse($invoice); diff --git a/app/Http/Requests/Company/StoreCompanyRequest.php b/app/Http/Requests/Company/StoreCompanyRequest.php index 62c0eb8f1255..6a6d24342e46 100644 --- a/app/Http/Requests/Company/StoreCompanyRequest.php +++ b/app/Http/Requests/Company/StoreCompanyRequest.php @@ -61,6 +61,9 @@ class StoreCompanyRequest extends Request { $input = $this->all(); + if(!isset($input['name'])) + $input['name'] = 'Untitled Company'; + if (array_key_exists('google_analytics_url', $input)) { $input['google_analytics_key'] = $input['google_analytics_url']; } diff --git a/app/Http/Requests/Company/UpdateCompanyRequest.php b/app/Http/Requests/Company/UpdateCompanyRequest.php index 08d1c89bd94d..2a8d881bca6d 100644 --- a/app/Http/Requests/Company/UpdateCompanyRequest.php +++ b/app/Http/Requests/Company/UpdateCompanyRequest.php @@ -108,7 +108,7 @@ class UpdateCompanyRequest extends Request } } - $settings['email_style_custom'] = str_replace("{{", "", $settings['email_style_custom']); + $settings['email_style_custom'] = str_replace(['{{','}}'], ['',''], $settings['email_style_custom']); if (! $account->isFreeHostedClient()) { return $settings; @@ -127,9 +127,11 @@ class UpdateCompanyRequest extends Request private function addScheme($url, $scheme = 'https://') { - $url = str_replace('http://', '', $url); - - $url = parse_url($url, PHP_URL_SCHEME) === null ? $scheme.$url : $url; + if(Ninja::isHosted()) + { + $url = str_replace('http://', '', $url); + $url = parse_url($url, PHP_URL_SCHEME) === null ? $scheme.$url : $url; + } return rtrim($url, '/'); } diff --git a/app/Http/ValidationRules/Company/ValidCompanyQuantity.php b/app/Http/ValidationRules/Company/ValidCompanyQuantity.php index a465aef0a3a0..a90e861c9ae2 100644 --- a/app/Http/ValidationRules/Company/ValidCompanyQuantity.php +++ b/app/Http/ValidationRules/Company/ValidCompanyQuantity.php @@ -26,6 +26,7 @@ class ValidCompanyQuantity implements Rule */ public function passes($attribute, $value) { + if (Ninja::isSelfHost()) { return auth()->user()->company()->account->companies->count() < 10; } diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index 90dd5e35fe8e..3e6d3914a942 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -74,55 +74,55 @@ class ReminderJob implements ShouldQueue set_time_limit(0); Invoice::query() - ->where('is_deleted', 0) - ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) - ->whereNull('deleted_at') - ->where('balance', '>', 0) - ->where('next_send_date', '<=', now()->toDateTimeString()) - ->whereHas('client', function ($query) { - $query->where('is_deleted', 0) - ->where('deleted_at', null); - }) - ->whereHas('company', function ($query) { - $query->where('is_disabled', 0); - }) - ->with('invitations')->cursor()->each(function ($invoice) { - if ($invoice->isPayable()) { - $reminder_template = $invoice->calculateTemplate('invoice'); - nlog("reminder template = {$reminder_template}"); - $invoice = $this->calcLateFee($invoice, $reminder_template); - $invoice->service()->touchReminder($reminder_template)->save(); - $invoice->service()->touchPdf(true); + ->where('is_deleted', 0) + ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) + ->whereNull('deleted_at') + ->where('balance', '>', 0) + ->where('next_send_date', '<=', now()->toDateTimeString()) + ->whereHas('client', function ($query) { + $query->where('is_deleted', 0) + ->where('deleted_at', null); + }) + ->whereHas('company', function ($query) { + $query->where('is_disabled', 0); + }) + ->with('invitations')->cursor()->each(function ($invoice) { + if ($invoice->isPayable()) { + $reminder_template = $invoice->calculateTemplate('invoice'); + nlog("reminder template = {$reminder_template}"); + $invoice = $this->calcLateFee($invoice, $reminder_template); + $invoice->service()->touchReminder($reminder_template)->save(); + $invoice->service()->touchPdf(true); - //20-04-2022 fixes for endless reminders - generic template naming was wrong - $enabled_reminder = 'enable_'.$reminder_template; - - if ($reminder_template == 'endless_reminder') { - $enabled_reminder = 'enable_reminder_endless'; - } - - //check if this reminder needs to be emailed - //15-01-2022 - insert addition if block if send_reminders is definitely set - if (in_array($reminder_template, ['reminder1', 'reminder2', 'reminder3', 'reminder_endless', 'endless_reminder']) && - $invoice->client->getSetting($enabled_reminder) && - $invoice->client->getSetting('send_reminders') && - (Ninja::isSelfHost() || $invoice->company->account->isPaidHostedClient())) { - - $invoice->invitations->each(function ($invitation) use ($invoice, $reminder_template) { - EmailEntity::dispatch($invitation, $invitation->company, $reminder_template); - nlog("Firing reminder email for invoice {$invoice->number} - {$reminder_template}"); - }); - - if ($invoice->invitations->count() > 0) { - event(new InvoiceWasEmailed($invoice->invitations->first(), $invoice->company, Ninja::eventVars(), $reminder_template)); - } - } - $invoice->service()->setReminder()->save(); - } else { - $invoice->next_send_date = null; - $invoice->save(); + //20-04-2022 fixes for endless reminders - generic template naming was wrong + $enabled_reminder = 'enable_'.$reminder_template; + if ($reminder_template == 'endless_reminder') { + $enabled_reminder = 'enable_reminder_endless'; } - }); + + //check if this reminder needs to be emailed + //15-01-2022 - insert addition if block if send_reminders is definitely set + if (in_array($reminder_template, ['reminder1', 'reminder2', 'reminder3', 'reminder_endless', 'endless_reminder']) && + $invoice->client->getSetting($enabled_reminder) && + $invoice->client->getSetting('send_reminders') && + (Ninja::isSelfHost() || $invoice->company->account->isPaidHostedClient())) { + + $invoice->invitations->each(function ($invitation) use ($invoice, $reminder_template) { + EmailEntity::dispatch($invitation, $invitation->company, $reminder_template); + nlog("Firing reminder email for invoice {$invoice->number} - {$reminder_template}"); + }); + + if ($invoice->invitations->count() > 0) { + event(new InvoiceWasEmailed($invoice->invitations->first(), $invoice->company, Ninja::eventVars(), $reminder_template)); + } + } + $invoice->service()->setReminder()->save(); + } else { + $invoice->next_send_date = null; + $invoice->save(); + } + + }); } /** @@ -206,22 +206,17 @@ class ReminderJob implements ShouldQueue $invoice->line_items = $invoice_items; /**Refresh Invoice values*/ - $invoice->calc()->getInvoice()->save(); - $invoice->fresh(); + $invoice = $invoice->calc()->getInvoice(); // $invoice->service()->deletePdf(); 24-11-2022 no need to delete here because we regenerate later anyway - /* Refresh the client here to ensure the balance is fresh */ - $client = $invoice->client; - $client = $client->fresh(); - nlog('adjusting client balance and invoice balance by #'.$invoice->number.' '.($invoice->balance - $temp_invoice_balance)); - $client->service()->updateBalance($invoice->balance - $temp_invoice_balance); + $invoice->client->service()->updateBalance($invoice->balance - $temp_invoice_balance); $invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}"); $transaction = [ 'invoice' => $invoice->transaction_event(), 'payment' => [], - 'client' => $client->transaction_event(), + 'client' => $invoice->client->transaction_event(), 'credit' => [], 'metadata' => ['setLateFee'], ]; diff --git a/app/Services/Client/ClientService.php b/app/Services/Client/ClientService.php index 6ffec56c2046..9b9da5dfaf0a 100644 --- a/app/Services/Client/ClientService.php +++ b/app/Services/Client/ClientService.php @@ -30,28 +30,43 @@ class ClientService public function updateBalance(float $amount) { - \DB::connection(config('database.default'))->transaction(function () use($amount) { + try { + \DB::connection(config('database.default'))->transaction(function () use($amount) { - $this->client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first(); - $this->client->balance += $amount; - $this->client->save(); + nlog("inside transaction - updating balance by {$amount}"); - }, 2); + $this->client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first(); + $this->client->balance += $amount; + $this->client->save(); + + }, 2); + } + catch (\Throwable $throwable) { + nlog("DB ERROR " . $throwable->getMessage()); + } return $this; + } public function updateBalanceAndPaidToDate(float $balance, float $paid_to_date) { - \DB::connection(config('database.default'))->transaction(function () use($balance, $paid_to_date) { + try { + \DB::connection(config('database.default'))->transaction(function () use($balance, $paid_to_date) { - $this->client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first(); - $this->client->balance += $balance; - $this->client->paid_to_date += $paid_to_date; - $this->client->save(); + $this->client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first(); + $this->client->balance += $balance; + $this->client->paid_to_date += $paid_to_date; + $this->client->save(); + + }, 2); + } + catch (\Throwable $throwable) { + nlog("DB ERROR " . $throwable->getMessage()); + } + - }, 2); return $this; } diff --git a/app/Services/Invoice/ApplyPaymentAmount.php b/app/Services/Invoice/ApplyPaymentAmount.php index 473a3b9591b7..6783347bc1f2 100644 --- a/app/Services/Invoice/ApplyPaymentAmount.php +++ b/app/Services/Invoice/ApplyPaymentAmount.php @@ -83,7 +83,7 @@ class ApplyPaymentAmount extends AbstractService ->updatePaidToDate($payment->amount) ->setCalculatedStatus() ->applyNumber() - ->deletePdf() + ->touchPdf() ->save(); $this->invoice diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 9a0efc7347d9..740c21a5fdd3 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -220,7 +220,6 @@ class InvoiceService public function markDeleted() { $this->removeUnpaidGatewayFees(); - // $this->deletePdf(); $this->invoice = (new MarkInvoiceDeleted($this->invoice))->run(); @@ -380,6 +379,7 @@ class InvoiceService })->toArray(); $this->invoice = $this->invoice->calc()->getInvoice(); + $this->invoice->service()->touchPdf(); /* 24-03-2022 */ $new_balance = $this->invoice->balance; diff --git a/database/migrations/2022_11_22_215618_lock_tasks_when_invoiced.php b/database/migrations/2022_11_22_215618_lock_tasks_when_invoiced.php index 30bb7f57261c..105ccb345b96 100644 --- a/database/migrations/2022_11_22_215618_lock_tasks_when_invoiced.php +++ b/database/migrations/2022_11_22_215618_lock_tasks_when_invoiced.php @@ -67,6 +67,8 @@ return new class extends Migration } } + \Illuminate\Support\Facades\Artisan::call('ninja:design-update'); + } /** diff --git a/database/schema/db-ninja-01-schema.dump b/database/schema/db-ninja-01-schema.dump index e311a8edc3c2..9ceaf0a561c6 100644 --- a/database/schema/db-ninja-01-schema.dump +++ b/database/schema/db-ninja-01-schema.dump @@ -51,7 +51,7 @@ CREATE TABLE `accounts` ( PRIMARY KEY (`id`), KEY `accounts_payment_id_index` (`payment_id`), KEY `accounts_key_index` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `activities`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -103,7 +103,7 @@ CREATE TABLE `activities` ( KEY `activities_purchase_order_id_company_id_index` (`purchase_order_id`,`company_id`), KEY `activities_vendor_contact_id_company_id_index` (`vendor_contact_id`,`company_id`), CONSTRAINT `activities_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `backups`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -120,7 +120,7 @@ CREATE TABLE `backups` ( PRIMARY KEY (`id`), KEY `backups_activity_id_foreign` (`activity_id`), CONSTRAINT `backups_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `activities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_companies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -141,7 +141,7 @@ CREATE TABLE `bank_companies` ( CONSTRAINT `bank_companies_bank_id_foreign` FOREIGN KEY (`bank_id`) REFERENCES `banks` (`id`), CONSTRAINT `bank_companies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_companies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_integrations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -198,7 +198,7 @@ CREATE TABLE `bank_subcompanies` ( CONSTRAINT `bank_subcompanies_bank_company_id_foreign` FOREIGN KEY (`bank_company_id`) REFERENCES `bank_companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_subcompanies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `bank_subcompanies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bank_transaction_rules`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -277,7 +277,7 @@ CREATE TABLE `banks` ( `bank_library_id` int(11) NOT NULL DEFAULT 1, `config` text DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `client_contacts`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -328,7 +328,7 @@ CREATE TABLE `client_contacts` ( KEY `client_contacts_contact_key(20)_index` (`contact_key`(20)), KEY `client_contacts_email_index` (`email`), CONSTRAINT `client_contacts_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `client_gateway_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -353,7 +353,7 @@ CREATE TABLE `client_gateway_tokens` ( KEY `client_gateway_tokens_client_id_foreign` (`client_id`), CONSTRAINT `client_gateway_tokens_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `client_gateway_tokens_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `client_subscriptions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -383,7 +383,7 @@ CREATE TABLE `client_subscriptions` ( CONSTRAINT `client_subscriptions_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `client_subscriptions_recurring_invoice_id_foreign` FOREIGN KEY (`recurring_invoice_id`) REFERENCES `recurring_invoices` (`id`), CONSTRAINT `client_subscriptions_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `clients`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -442,7 +442,7 @@ CREATE TABLE `clients` ( CONSTRAINT `clients_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `clients_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), CONSTRAINT `clients_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `companies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -519,6 +519,7 @@ CREATE TABLE `companies` ( `invoice_task_project` tinyint(1) NOT NULL DEFAULT 0, `report_include_deleted` tinyint(1) NOT NULL DEFAULT 0, `invoice_task_lock` tinyint(1) NOT NULL DEFAULT 0, + `use_vendor_currency` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `companies_company_key_unique` (`company_key`), KEY `companies_industry_id_foreign` (`industry_id`), @@ -530,7 +531,7 @@ CREATE TABLE `companies` ( CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `companies_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), CONSTRAINT `companies_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_gateways`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -569,7 +570,7 @@ CREATE TABLE `company_gateways` ( CONSTRAINT `company_gateways_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_gateways_gateway_key_foreign` FOREIGN KEY (`gateway_key`) REFERENCES `gateways` (`key`), CONSTRAINT `company_gateways_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_ledgers`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -593,7 +594,7 @@ CREATE TABLE `company_ledgers` ( KEY `company_ledgers_client_id_foreign` (`client_id`), CONSTRAINT `company_ledgers_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_ledgers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -619,7 +620,7 @@ CREATE TABLE `company_tokens` ( CONSTRAINT `company_tokens_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_tokens_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `company_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `company_user`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -640,14 +641,14 @@ CREATE TABLE `company_user` ( `created_at` timestamp(6) NULL DEFAULT NULL, `updated_at` timestamp(6) NULL DEFAULT NULL, `permissions_updated_at` timestamp NOT NULL DEFAULT current_timestamp(), - `ninja_portal_url` text NOT NULL, + `ninja_portal_url` text NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `company_user_company_id_user_id_unique` (`company_id`,`user_id`), KEY `company_user_account_id_company_id_deleted_at_index` (`account_id`,`company_id`,`deleted_at`), KEY `company_user_user_id_index` (`user_id`), CONSTRAINT `company_user_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE, CONSTRAINT `company_user_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `countries`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -669,10 +670,10 @@ CREATE TABLE `countries` ( `eea` tinyint(1) NOT NULL DEFAULT 0, `swap_postal_code` tinyint(1) NOT NULL DEFAULT 0, `swap_currency_symbol` tinyint(1) NOT NULL DEFAULT 0, - `thousand_separator` varchar(191) DEFAULT NULL, - `decimal_separator` varchar(191) DEFAULT NULL, + `thousand_separator` varchar(191) DEFAULT '', + `decimal_separator` varchar(191) DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `credit_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -704,11 +705,12 @@ CREATE TABLE `credit_invitations` ( KEY `credit_invitations_deleted_at_credit_id_company_id_index` (`deleted_at`,`credit_id`,`company_id`), KEY `credit_invitations_credit_id_index` (`credit_id`), KEY `credit_invitations_key_index` (`key`), + KEY `credit_invitations_message_id_index` (`message_id`), CONSTRAINT `credit_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credit_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credit_invitations_credit_id_foreign` FOREIGN KEY (`credit_id`) REFERENCES `credits` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credit_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `credits`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -784,7 +786,7 @@ CREATE TABLE `credits` ( CONSTRAINT `credits_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credits_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `credits_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `currencies`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -800,7 +802,7 @@ CREATE TABLE `currencies` ( `swap_currency_symbol` tinyint(1) NOT NULL DEFAULT 0, `exchange_rate` decimal(13,6) NOT NULL DEFAULT 1.000000, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `date_formats`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -811,7 +813,7 @@ CREATE TABLE `date_formats` ( `format_moment` varchar(191) NOT NULL, `format_dart` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `datetime_formats`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -822,7 +824,7 @@ CREATE TABLE `datetime_formats` ( `format_moment` varchar(191) NOT NULL, `format_dart` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `designs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -843,7 +845,7 @@ CREATE TABLE `designs` ( KEY `designs_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `designs_company_id_index` (`company_id`), CONSTRAINT `designs_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `documents`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -879,7 +881,7 @@ CREATE TABLE `documents` ( KEY `documents_company_id_index` (`company_id`), KEY `documents_documentable_id_documentable_type_deleted_at_index` (`documentable_id`,`documentable_type`,`deleted_at`), CONSTRAINT `documents_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `expense_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -899,7 +901,7 @@ CREATE TABLE `expense_categories` ( KEY `expense_categories_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `expense_categories_company_id_index` (`company_id`), CONSTRAINT `expense_categories_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `expenses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -951,13 +953,14 @@ CREATE TABLE `expenses` ( `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, `calculate_tax_by_amount` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `expenses_company_id_number_unique` (`company_id`,`number`), KEY `expenses_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `expenses_user_id_foreign` (`user_id`), KEY `expenses_company_id_index` (`company_id`), KEY `expenses_invoice_id_deleted_at_index` (`invoice_id`,`deleted_at`), CONSTRAINT `expenses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `failed_jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -972,7 +975,7 @@ CREATE TABLE `failed_jobs` ( `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `gateway_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -982,7 +985,7 @@ CREATE TABLE `gateway_types` ( `alias` varchar(191) DEFAULT NULL, `name` varchar(191) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `gateways`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1003,7 +1006,7 @@ CREATE TABLE `gateways` ( `updated_at` timestamp(6) NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `gateways_key_unique` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `group_settings`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1022,7 +1025,7 @@ CREATE TABLE `group_settings` ( PRIMARY KEY (`id`), KEY `group_settings_company_id_deleted_at_index` (`company_id`,`deleted_at`), CONSTRAINT `group_settings_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `industries`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1031,7 +1034,7 @@ CREATE TABLE `industries` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `invoice_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1062,12 +1065,13 @@ CREATE TABLE `invoice_invitations` ( KEY `invoice_invitations_company_id_foreign` (`company_id`), KEY `invoice_invitations_deleted_at_invoice_id_company_id_index` (`deleted_at`,`invoice_id`,`company_id`), KEY `invoice_invitations_invoice_id_index` (`invoice_id`), + KEY `invoice_invitations_message_id_index` (`message_id`), KEY `invoice_invitations_key_deleted_at_index` (`key`,`deleted_at`), CONSTRAINT `invoice_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoice_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoice_invitations_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoice_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `invoices`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1146,7 +1150,7 @@ CREATE TABLE `invoices` ( CONSTRAINT `invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1161,7 +1165,7 @@ CREATE TABLE `jobs` ( `created_at` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `jobs_queue_index` (`queue`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `languages`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1171,7 +1175,7 @@ CREATE TABLE `languages` ( `name` varchar(191) NOT NULL, `locale` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `licenses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1191,7 +1195,7 @@ CREATE TABLE `licenses` ( `recurring_invoice_id` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `licenses_license_key_unique` (`license_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `migrations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1201,7 +1205,7 @@ CREATE TABLE `migrations` ( `migration` varchar(191) NOT NULL, `batch` int(11) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `password_resets`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1211,7 +1215,7 @@ CREATE TABLE `password_resets` ( `token` varchar(255) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, KEY `password_resets_email_index` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_hashes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1229,7 +1233,7 @@ CREATE TABLE `payment_hashes` ( KEY `payment_hashes_payment_id_foreign` (`payment_id`), KEY `payment_hashes_hash_index` (`hash`), CONSTRAINT `payment_hashes_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_libraries`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1241,7 +1245,7 @@ CREATE TABLE `payment_libraries` ( `name` varchar(191) DEFAULT NULL, `visible` tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_terms`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1261,7 +1265,7 @@ CREATE TABLE `payment_terms` ( KEY `payment_terms_user_id_foreign` (`user_id`), CONSTRAINT `payment_terms_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `payment_terms_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1271,7 +1275,7 @@ CREATE TABLE `payment_types` ( `name` varchar(191) NOT NULL, `gateway_type_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `paymentables`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1290,7 +1294,7 @@ CREATE TABLE `paymentables` ( KEY `paymentables_payment_id_foreign` (`payment_id`), KEY `paymentables_paymentable_id_index` (`paymentable_id`), CONSTRAINT `paymentables_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payments`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1330,9 +1334,10 @@ CREATE TABLE `payments` ( `custom_value2` text DEFAULT NULL, `custom_value3` text DEFAULT NULL, `custom_value4` text DEFAULT NULL, - `idempotency_key` varchar(64) DEFAULT NULL, `transaction_id` bigint(20) unsigned DEFAULT NULL, + `idempotency_key` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`), + UNIQUE KEY `payments_company_id_number_unique` (`company_id`,`number`), UNIQUE KEY `payments_company_id_idempotency_key_unique` (`company_id`,`idempotency_key`), KEY `payments_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `payments_client_contact_id_foreign` (`client_contact_id`), @@ -1348,7 +1353,7 @@ CREATE TABLE `payments` ( CONSTRAINT `payments_company_gateway_id_foreign` FOREIGN KEY (`company_gateway_id`) REFERENCES `company_gateways` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `payments_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `payments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `products`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1390,7 +1395,7 @@ CREATE TABLE `products` ( KEY `products_product_key_company_id_index` (`product_key`,`company_id`), CONSTRAINT `products_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `products_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `projects`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1418,12 +1423,13 @@ CREATE TABLE `projects` ( `number` varchar(191) DEFAULT NULL, `color` varchar(191) NOT NULL DEFAULT '#fff', PRIMARY KEY (`id`), + UNIQUE KEY `projects_company_id_number_unique` (`company_id`,`number`), KEY `projects_user_id_foreign` (`user_id`), KEY `projects_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `projects_company_id_index` (`company_id`), CONSTRAINT `projects_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `projects_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `purchase_order_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1526,6 +1532,7 @@ CREATE TABLE `purchase_orders` ( `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `expense_id` int(10) unsigned DEFAULT NULL, + `currency_id` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `purchase_orders_user_id_foreign` (`user_id`), KEY `purchase_orders_company_id_deleted_at_index` (`company_id`,`deleted_at`), @@ -1567,11 +1574,12 @@ CREATE TABLE `quote_invitations` ( KEY `quote_invitations_deleted_at_quote_id_company_id_index` (`deleted_at`,`quote_id`,`company_id`), KEY `quote_invitations_quote_id_index` (`quote_id`), KEY `quote_invitations_key_index` (`key`), + KEY `quote_invitations_message_id_index` (`message_id`), CONSTRAINT `quote_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quote_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quote_invitations_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `quotes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quote_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `quotes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1648,7 +1656,7 @@ CREATE TABLE `quotes` ( CONSTRAINT `quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_expenses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1747,7 +1755,7 @@ CREATE TABLE `recurring_invoice_invitations` ( CONSTRAINT `recurring_invoice_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoice_invitations_recurring_invoice_id_foreign` FOREIGN KEY (`recurring_invoice_id`) REFERENCES `recurring_invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoice_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_invoices`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1761,7 +1769,7 @@ CREATE TABLE `recurring_invoices` ( `project_id` int(10) unsigned DEFAULT NULL, `vendor_id` int(10) unsigned DEFAULT NULL, `status_id` int(10) unsigned NOT NULL, - `number` text DEFAULT NULL, + `number` varchar(191) DEFAULT NULL, `discount` double(8,2) NOT NULL DEFAULT 0.00, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `po_number` varchar(191) DEFAULT NULL, @@ -1815,6 +1823,7 @@ CREATE TABLE `recurring_invoices` ( `subscription_id` int(10) unsigned DEFAULT NULL, `next_send_date_client` datetime DEFAULT NULL, PRIMARY KEY (`id`), + UNIQUE KEY `recurring_invoices_company_id_number_unique` (`company_id`,`number`), KEY `recurring_invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `recurring_invoices_user_id_foreign` (`user_id`), KEY `recurring_invoices_client_id_index` (`client_id`), @@ -1823,7 +1832,7 @@ CREATE TABLE `recurring_invoices` ( CONSTRAINT `recurring_invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recurring_quote_invitations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1932,7 +1941,7 @@ CREATE TABLE `recurring_quotes` ( CONSTRAINT `recurring_quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `recurring_quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `schedulers`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1942,8 +1951,8 @@ CREATE TABLE `schedulers` ( `paused` tinyint(1) NOT NULL DEFAULT 0, `is_deleted` tinyint(1) NOT NULL DEFAULT 0, `repeat_every` varchar(191) NOT NULL, - `start_from` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `scheduled_run` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `start_from` timestamp NULL DEFAULT NULL, + `scheduled_run` timestamp NULL DEFAULT NULL, `company_id` bigint(20) unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, @@ -1962,7 +1971,7 @@ CREATE TABLE `sizes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `subscriptions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1974,8 +1983,8 @@ CREATE TABLE `subscriptions` ( `company_id` int(10) unsigned NOT NULL, `product_ids` text DEFAULT NULL, `frequency_id` int(10) unsigned DEFAULT NULL, - `auto_bill` text DEFAULT NULL, - `promo_code` text DEFAULT NULL, + `auto_bill` text DEFAULT '', + `promo_code` text DEFAULT '', `promo_discount` double(8,2) NOT NULL DEFAULT 0.00, `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, `allow_cancellation` tinyint(1) NOT NULL DEFAULT 1, @@ -2007,7 +2016,7 @@ CREATE TABLE `subscriptions` ( UNIQUE KEY `subscriptions_company_id_name_unique` (`company_id`,`name`), KEY `billing_subscriptions_company_id_deleted_at_index` (`company_id`,`deleted_at`), CONSTRAINT `billing_subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `system_logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2029,7 +2038,7 @@ CREATE TABLE `system_logs` ( KEY `system_logs_client_id_foreign` (`client_id`), CONSTRAINT `system_logs_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `system_logs_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `task_statuses`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2051,7 +2060,7 @@ CREATE TABLE `task_statuses` ( KEY `task_statuses_user_id_foreign` (`user_id`), CONSTRAINT `task_statuses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `task_statuses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tasks`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2085,6 +2094,7 @@ CREATE TABLE `tasks` ( `status_order` int(11) DEFAULT NULL, `invoice_lock` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `tasks_company_id_number_unique` (`company_id`,`number`), KEY `tasks_company_id_deleted_at_index` (`company_id`,`deleted_at`), KEY `tasks_user_id_foreign` (`user_id`), KEY `tasks_invoice_id_foreign` (`invoice_id`), @@ -2094,7 +2104,7 @@ CREATE TABLE `tasks` ( CONSTRAINT `tasks_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tax_rates`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2115,7 +2125,7 @@ CREATE TABLE `tax_rates` ( KEY `tax_rates_company_id_index` (`company_id`), CONSTRAINT `tax_rates_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tax_rates_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `timezones`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2126,7 +2136,7 @@ CREATE TABLE `timezones` ( `location` varchar(191) NOT NULL, `utc_offset` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `transaction_events`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2211,7 +2221,7 @@ CREATE TABLE `users` ( UNIQUE KEY `users_oauth_user_id_oauth_provider_id_unique` (`oauth_user_id`,`oauth_provider_id`), KEY `users_account_id_index` (`account_id`), CONSTRAINT `users_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendor_contacts`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2263,7 +2273,7 @@ CREATE TABLE `vendor_contacts` ( CONSTRAINT `vendor_contacts_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `vendor_contacts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `vendor_contacts_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendors`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2308,7 +2318,7 @@ CREATE TABLE `vendors` ( CONSTRAINT `vendors_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`), CONSTRAINT `vendors_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`), CONSTRAINT `vendors_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `webhooks`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2330,7 +2340,7 @@ CREATE TABLE `webhooks` ( KEY `subscriptions_company_id_foreign` (`company_id`), KEY `subscriptions_event_id_company_id_index` (`event_id`,`company_id`), CONSTRAINT `subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -2361,158 +2371,155 @@ INSERT INTO `migrations` VALUES (19,'2020_10_12_204517_project_number_column',1) INSERT INTO `migrations` VALUES (20,'2020_10_14_201320_project_ids_to_entities',1); INSERT INTO `migrations` VALUES (21,'2020_10_19_101823_project_name_unique_removal',1); INSERT INTO `migrations` VALUES (22,'2020_10_21_222738_expenses_nullable_assigned_user',1); -INSERT INTO `migrations` VALUES (23,'2020_10_22_204900_company_table_fields',2); -INSERT INTO `migrations` VALUES (24,'2020_10_27_021751_tasks_invoice_documents',2); -INSERT INTO `migrations` VALUES (25,'2020_10_28_224711_status_sort_order',2); -INSERT INTO `migrations` VALUES (26,'2020_10_28_225022_assigned_user_tasks_table',2); -INSERT INTO `migrations` VALUES (27,'2020_10_29_001541_vendors_phone_column',2); -INSERT INTO `migrations` VALUES (28,'2020_10_29_093836_change_start_time_column_type',2); -INSERT INTO `migrations` VALUES (29,'2020_10_29_204434_tasks_table_project_nullable',2); -INSERT INTO `migrations` VALUES (30,'2020_10_29_210402_change_default_show_tasks_table',2); -INSERT INTO `migrations` VALUES (31,'2020_10_30_084139_change_expense_currency_id_column',2); -INSERT INTO `migrations` VALUES (32,'2020_11_01_031750_drop_migrating_column',2); -INSERT INTO `migrations` VALUES (33,'2020_11_03_200345_company_gateway_fields_refactor',2); -INSERT INTO `migrations` VALUES (34,'2020_11_08_212050_custom_fields_for_payments_table',2); -INSERT INTO `migrations` VALUES (35,'2020_11_12_104413_company_gateway_rename_column',2); -INSERT INTO `migrations` VALUES (36,'2020_11_15_203755_soft_delete_paymentables',2); -INSERT INTO `migrations` VALUES (37,'2020_12_14_114722_task_fields',2); -INSERT INTO `migrations` VALUES (38,'2020_12_17_104033_add_enable_product_discount_field_to_companies_table',2); -INSERT INTO `migrations` VALUES (39,'2020_12_20_005609_change_products_table_cost_resolution',2); -INSERT INTO `migrations` VALUES (40,'2020_12_23_220648_remove_null_values_in_countries_table',2); -INSERT INTO `migrations` VALUES (41,'2021_01_03_215053_update_canadian_dollar_symbol',2); -INSERT INTO `migrations` VALUES (42,'2021_01_05_013203_improve_decimal_resolution',2); -INSERT INTO `migrations` VALUES (43,'2021_01_07_023350_update_singapore_dollar_symbol',2); -INSERT INTO `migrations` VALUES (44,'2021_01_08_093324_expenses_table_additional_fields',2); -INSERT INTO `migrations` VALUES (45,'2021_01_11_092056_fix_company_settings_url',2); -INSERT INTO `migrations` VALUES (46,'2021_01_17_040331_change_custom_surcharge_column_type',2); -INSERT INTO `migrations` VALUES (47,'2021_01_23_044502_scheduler_is_running_check',2); -INSERT INTO `migrations` VALUES (48,'2021_01_24_052645_add_paid_to_date_column',2); -INSERT INTO `migrations` VALUES (49,'2021_01_25_095351_add_number_field_to_clients_and_vendors',2); -INSERT INTO `migrations` VALUES (50,'2021_01_29_121502_add_permission_changed_timestamp',2); -INSERT INTO `migrations` VALUES (51,'2021_02_15_214724_additional_company_properties',2); -INSERT INTO `migrations` VALUES (52,'2021_02_19_212722_email_last_confirmed_email_address_users_table',2); -INSERT INTO `migrations` VALUES (53,'2021_02_25_205901_enum_invitations_email_status',2); -INSERT INTO `migrations` VALUES (54,'2021_02_27_091713_add_invoice_task_datelog_property',2); -INSERT INTO `migrations` VALUES (55,'2021_03_03_230941_add_has_password_field_to_user_table',2); -INSERT INTO `migrations` VALUES (56,'2021_03_08_123729_create_billing_subscriptions_table',2); -INSERT INTO `migrations` VALUES (57,'2021_03_08_205030_add_russian_lang',2); -INSERT INTO `migrations` VALUES (58,'2021_03_09_132242_add_currency_id_to_billing_subscriptions_table',2); -INSERT INTO `migrations` VALUES (59,'2021_03_18_113704_change_2fa_column_from_varchar_to_text',2); -INSERT INTO `migrations` VALUES (60,'2021_03_19_221024_add_unique_constraints_on_all_entities',2); -INSERT INTO `migrations` VALUES (61,'2021_03_20_033751_add_invoice_id_to_client_subscriptions_table',2); -INSERT INTO `migrations` VALUES (62,'2021_03_23_233844_add_nullable_constraint_to_recurring_invoice_id',2); -INSERT INTO `migrations` VALUES (63,'2021_03_25_082025_refactor_billing_scriptions_table',2); -INSERT INTO `migrations` VALUES (64,'2021_03_26_201148_add_price_column_to_subscriptions_table',2); -INSERT INTO `migrations` VALUES (65,'2021_04_01_093128_modify_column_on_subscriptions_table',2); -INSERT INTO `migrations` VALUES (66,'2021_04_05_115345_add_trial_duration_to_accounts_table',2); -INSERT INTO `migrations` VALUES (67,'2021_04_05_213802_add_rest_fields_to_webhooks_table',2); -INSERT INTO `migrations` VALUES (68,'2021_04_06_131028_create_licenses_table',2); -INSERT INTO `migrations` VALUES (69,'2021_04_12_095424_stripe_connect_gateway',2); -INSERT INTO `migrations` VALUES (70,'2021_04_13_013424_add_subscription_id_to_activities_table',2); -INSERT INTO `migrations` VALUES (71,'2021_04_22_110240_add_property_to_checkout_gateway_config',2); -INSERT INTO `migrations` VALUES (72,'2021_04_29_085418_add_number_years_active_to_company_users_table',2); -INSERT INTO `migrations` VALUES (73,'2021_05_03_152940_make_braintree_provider_visible',2); -INSERT INTO `migrations` VALUES (74,'2021_05_04_231430_add_task_property_to_companies_table',2); -INSERT INTO `migrations` VALUES (75,'2021_05_05_014713_activate_we_pay',2); -INSERT INTO `migrations` VALUES (76,'2021_05_10_041528_add_recurring_invoice_id_to_activities_table',2); -INSERT INTO `migrations` VALUES (77,'2021_05_27_105157_add_tech_design',2); -INSERT INTO `migrations` VALUES (78,'2021_05_30_100933_make_documents_assigned_user_nullable',2); -INSERT INTO `migrations` VALUES (79,'2021_06_10_221012_add_ninja_portal_column_to_accounts_table',2); -INSERT INTO `migrations` VALUES (80,'2021_06_24_095942_payments_table_currency_nullable',2); -INSERT INTO `migrations` VALUES (81,'2021_06_24_115919_update_designs',2); -INSERT INTO `migrations` VALUES (82,'2021_07_08_115919_update_designs',3); -INSERT INTO `migrations` VALUES (83,'2021_07_10_085821_activate_payfast_payment_driver',3); -INSERT INTO `migrations` VALUES (84,'2021_07_19_074503_set_invoice_task_datelog_true_in_companies_table',4); -INSERT INTO `migrations` VALUES (85,'2021_07_20_095537_activate_paytrace_payment_driver',4); -INSERT INTO `migrations` VALUES (86,'2021_07_21_213344_change_english_languages_tables',4); -INSERT INTO `migrations` VALUES (87,'2021_07_21_234227_activate_eway_payment_driver',4); -INSERT INTO `migrations` VALUES (88,'2021_08_03_115024_activate_mollie_payment_driver',4); -INSERT INTO `migrations` VALUES (89,'2021_08_05_235942_add_zelle_payment_type',4); -INSERT INTO `migrations` VALUES (90,'2021_08_07_222435_add_markdown_enabled_column_to_companies_table',4); -INSERT INTO `migrations` VALUES (91,'2021_08_10_034407_add_more_languages',4); -INSERT INTO `migrations` VALUES (92,'2021_08_18_220124_use_comma_as_decimal_place_companies_table',4); -INSERT INTO `migrations` VALUES (93,'2021_08_24_115919_update_designs',4); -INSERT INTO `migrations` VALUES (94,'2021_08_25_093105_report_include_drafts_in_companies_table',5); -INSERT INTO `migrations` VALUES (95,'2021_08_14_054458_square_payment_driver',6); -INSERT INTO `migrations` VALUES (96,'2021_08_23_101529_recurring_expenses_schema',6); -INSERT INTO `migrations` VALUES (97,'2021_09_05_101209_update_braintree_gateway',6); -INSERT INTO `migrations` VALUES (98,'2021_09_20_233053_set_square_test_mode_boolean',6); -INSERT INTO `migrations` VALUES (99,'2021_09_23_100629_add_currencies',6); -INSERT INTO `migrations` VALUES (100,'2021_09_24_201319_add_mollie_bank_transfer_to_payment_types',6); -INSERT INTO `migrations` VALUES (101,'2021_09_24_211504_add_kbc_to_payment_types',6); -INSERT INTO `migrations` VALUES (102,'2021_09_24_213858_add_bancontact_to_payment_types',6); -INSERT INTO `migrations` VALUES (103,'2021_09_28_154647_activate_gocardless_payment_driver',6); -INSERT INTO `migrations` VALUES (104,'2021_09_29_190258_add_required_client_registration_fields',6); -INSERT INTO `migrations` VALUES (105,'2021_10_04_134908_add_ideal_to_payment_types',6); -INSERT INTO `migrations` VALUES (106,'2021_10_06_044800_updated_bold_and_modern_designs',6); -INSERT INTO `migrations` VALUES (107,'2021_10_07_141737_razorpay',6); -INSERT INTO `migrations` VALUES (108,'2021_10_07_155410_add_hosted_page_to_payment_types',6); -INSERT INTO `migrations` VALUES (109,'2021_10_15_00000_stripe_payment_gateways',6); -INSERT INTO `migrations` VALUES (110,'2021_10_16_135200_add_direct_debit_to_payment_types',6); -INSERT INTO `migrations` VALUES (111,'2021_10_19_142200_add_gateway_type_for_direct_debit',6); -INSERT INTO `migrations` VALUES (112,'2021_10_20_005529_add_filename_to_backups_table',6); -INSERT INTO `migrations` VALUES (113,'2021_11_08_131308_onboarding',6); -INSERT INTO `migrations` VALUES (114,'2021_11_09_115919_update_designs',6); -INSERT INTO `migrations` VALUES (115,'2021_11_10_184847_add_is_migrate_column_to_accounts_table',6); -INSERT INTO `migrations` VALUES (116,'2021_11_11_163121_add_instant_bank_transfer',7); -INSERT INTO `migrations` VALUES (117,'2021_12_20_095542_add_serbian_language_translations',8); -INSERT INTO `migrations` VALUES (118,'2022_01_02_022421_add_slovak_language',8); -INSERT INTO `migrations` VALUES (119,'2022_01_06_061231_add_app_domain_id_to_gateways_table',8); -INSERT INTO `migrations` VALUES (120,'2022_01_18_004856_add_estonian_language',8); -INSERT INTO `migrations` VALUES (121,'2022_01_19_085907_add_platform_column_to_accounts_table',8); -INSERT INTO `migrations` VALUES (122,'2022_01_19_232436_add_kyd_currency',8); -INSERT INTO `migrations` VALUES (123,'2022_01_27_223617_add_client_count_to_accounts_table',8); -INSERT INTO `migrations` VALUES (124,'2022_02_06_091629_add_client_currency_conversion_to_companies_table',8); -INSERT INTO `migrations` VALUES (125,'2022_02_25_015411_update_stripe_apple_domain_config',9); -INSERT INTO `migrations` VALUES (126,'2022_03_09_053508_transaction_events',10); -INSERT INTO `migrations` VALUES (127,'2022_03_24_090728_markdown_email_enabled_wysiwyg_editor',10); -INSERT INTO `migrations` VALUES (128,'2022_03_29_014025_reverse_apple_domain_for_hosted',10); -INSERT INTO `migrations` VALUES (129,'2022_04_22_115838_client_settings_parse_for_types',10); -INSERT INTO `migrations` VALUES (130,'2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text',10); -INSERT INTO `migrations` VALUES (131,'2022_04_14_121548_forte_payment_gateway',11); -INSERT INTO `migrations` VALUES (132,'2022_05_08_004937_heal_stripe_gateway_configuration',11); -INSERT INTO `migrations` VALUES (133,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',11); -INSERT INTO `migrations` VALUES (134,'2022_05_18_055442_update_custom_value_four_columns',11); -INSERT INTO `migrations` VALUES (135,'2022_05_18_162152_create_scheduled_jobs_table',11); -INSERT INTO `migrations` VALUES (136,'2022_05_18_162443_create_schedulers_table',11); -INSERT INTO `migrations` VALUES (137,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',11); -INSERT INTO `migrations` VALUES (138,'2022_05_28_234651_create_purchase_orders_table',11); -INSERT INTO `migrations` VALUES (139,'2022_05_30_181109_drop_scheduled_jobs_table',11); -INSERT INTO `migrations` VALUES (140,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',11); -INSERT INTO `migrations` VALUES (141,'2022_05_31_101504_inventory_management_schema',11); -INSERT INTO `migrations` VALUES (142,'2022_06_01_215859_set_recurring_client_timestamp',11); -INSERT INTO `migrations` VALUES (143,'2022_06_01_224339_create_purchase_order_invitations_table',11); -INSERT INTO `migrations` VALUES (144,'2022_06_10_030503_set_account_flag_for_react',11); -INSERT INTO `migrations` VALUES (145,'2022_06_16_025156_add_react_switching_flag',11); -INSERT INTO `migrations` VALUES (146,'2022_06_17_082627_change_refresh_token_column_size',11); -INSERT INTO `migrations` VALUES (147,'2022_06_21_104350_fixes_for_description_in_pdf_designs',11); -INSERT INTO `migrations` VALUES (148,'2022_06_22_090547_set_oauth_expiry_column',11); -INSERT INTO `migrations` VALUES (149,'2022_06_24_141018_upgrade_failed_jobs_table',11); -INSERT INTO `migrations` VALUES (150,'2022_06_30_000126_add_flag_to_accounts_table',11); -INSERT INTO `migrations` VALUES (151,'2022_07_06_080127_add_purchase_order_to_expense',11); -INSERT INTO `migrations` VALUES (152,'2022_07_09_235510_add_index_to_payment_hash',11); -INSERT INTO `migrations` VALUES (153,'2022_07_18_033756_fixes_for_date_formats_table_react',11); -INSERT INTO `migrations` VALUES (154,'2022_07_21_023805_add_hebrew_language',11); -INSERT INTO `migrations` VALUES (155,'2022_07_26_091216_add_sms_verification_to_hosted_account',11); -INSERT INTO `migrations` VALUES (156,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',11); -INSERT INTO `migrations` VALUES (157,'2022_07_29_091235_correction_for_companies_table_types',11); -INSERT INTO `migrations` VALUES (158,'2022_08_11_011534_licenses_table_for_self_host',12); -INSERT INTO `migrations` VALUES (159,'2022_08_24_215917_invoice_task_project_companies_table',12); -INSERT INTO `migrations` VALUES (160,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',12); -INSERT INTO `migrations` VALUES (161,'2022_08_28_210111_add_index_to_payments_table',12); -INSERT INTO `migrations` VALUES (162,'2022_09_05_024719_update_designs_for_tech_template',12); -INSERT INTO `migrations` VALUES (163,'2022_09_07_101731_add_reporting_option_to_companies_table',12); -INSERT INTO `migrations` VALUES (164,'2022_09_21_012417_add_threeds_to_braintree',12); -INSERT INTO `migrations` VALUES (165,'2022_09_30_235337_add_idempotency_key_to_payments',12); -INSERT INTO `migrations` VALUES (166,'2022_10_05_205645_add_indexes_to_client_hash',12); -INSERT INTO `migrations` VALUES (167,'2022_10_06_011344_add_key_to_products',12); -INSERT INTO `migrations` VALUES (168,'2022_08_05_023357_bank_integration',13); -INSERT INTO `migrations` VALUES (169,'2022_10_07_065455_add_key_to_company_tokens_table',13); -INSERT INTO `migrations` VALUES (170,'2022_10_10_070137_add_documentable_index',13); -INSERT INTO `migrations` VALUES (171,'2022_10_27_044909_add_user_sms_verification_code',13); -INSERT INTO `migrations` VALUES (172,'2022_11_02_063742_add_verified_number_flag_to_users_table',13); -INSERT INTO `migrations` VALUES (173,'2022_11_04_013539_disabled_upstream_bank_integrations_table',13); -INSERT INTO `migrations` VALUES (174,'2022_11_06_215526_drop_html_backups_column_from_backups_table',13); -INSERT INTO `migrations` VALUES (175,'2022_11_13_034143_bank_transaction_rules_table',13); -INSERT INTO `migrations` VALUES (176,'2022_11_16_093535_calmness_design',13); -INSERT INTO `migrations` VALUES (177,'2022_11_22_215618_lock_tasks_when_invoiced',13); +INSERT INTO `migrations` VALUES (23,'2020_10_22_204900_company_table_fields',1); +INSERT INTO `migrations` VALUES (24,'2020_10_27_021751_tasks_invoice_documents',1); +INSERT INTO `migrations` VALUES (25,'2020_10_28_224711_status_sort_order',1); +INSERT INTO `migrations` VALUES (26,'2020_10_28_225022_assigned_user_tasks_table',1); +INSERT INTO `migrations` VALUES (27,'2020_10_29_001541_vendors_phone_column',1); +INSERT INTO `migrations` VALUES (28,'2020_10_29_093836_change_start_time_column_type',1); +INSERT INTO `migrations` VALUES (29,'2020_10_29_204434_tasks_table_project_nullable',1); +INSERT INTO `migrations` VALUES (30,'2020_10_29_210402_change_default_show_tasks_table',1); +INSERT INTO `migrations` VALUES (31,'2020_10_30_084139_change_expense_currency_id_column',1); +INSERT INTO `migrations` VALUES (32,'2020_11_01_031750_drop_migrating_column',1); +INSERT INTO `migrations` VALUES (33,'2020_11_03_200345_company_gateway_fields_refactor',1); +INSERT INTO `migrations` VALUES (34,'2020_11_08_212050_custom_fields_for_payments_table',1); +INSERT INTO `migrations` VALUES (35,'2020_11_12_104413_company_gateway_rename_column',1); +INSERT INTO `migrations` VALUES (36,'2020_11_15_203755_soft_delete_paymentables',1); +INSERT INTO `migrations` VALUES (37,'2020_12_14_114722_task_fields',1); +INSERT INTO `migrations` VALUES (38,'2020_12_17_104033_add_enable_product_discount_field_to_companies_table',1); +INSERT INTO `migrations` VALUES (39,'2020_12_20_005609_change_products_table_cost_resolution',1); +INSERT INTO `migrations` VALUES (40,'2020_12_23_220648_remove_null_values_in_countries_table',1); +INSERT INTO `migrations` VALUES (41,'2021_01_03_215053_update_canadian_dollar_symbol',1); +INSERT INTO `migrations` VALUES (42,'2021_01_05_013203_improve_decimal_resolution',1); +INSERT INTO `migrations` VALUES (43,'2021_01_07_023350_update_singapore_dollar_symbol',1); +INSERT INTO `migrations` VALUES (44,'2021_01_08_093324_expenses_table_additional_fields',1); +INSERT INTO `migrations` VALUES (45,'2021_01_11_092056_fix_company_settings_url',1); +INSERT INTO `migrations` VALUES (46,'2021_01_17_040331_change_custom_surcharge_column_type',1); +INSERT INTO `migrations` VALUES (47,'2021_01_23_044502_scheduler_is_running_check',1); +INSERT INTO `migrations` VALUES (48,'2021_01_24_052645_add_paid_to_date_column',1); +INSERT INTO `migrations` VALUES (49,'2021_01_25_095351_add_number_field_to_clients_and_vendors',1); +INSERT INTO `migrations` VALUES (50,'2021_01_29_121502_add_permission_changed_timestamp',1); +INSERT INTO `migrations` VALUES (51,'2021_02_15_214724_additional_company_properties',1); +INSERT INTO `migrations` VALUES (52,'2021_02_19_212722_email_last_confirmed_email_address_users_table',1); +INSERT INTO `migrations` VALUES (53,'2021_02_25_205901_enum_invitations_email_status',1); +INSERT INTO `migrations` VALUES (54,'2021_02_27_091713_add_invoice_task_datelog_property',1); +INSERT INTO `migrations` VALUES (55,'2021_03_03_230941_add_has_password_field_to_user_table',1); +INSERT INTO `migrations` VALUES (56,'2021_03_08_123729_create_billing_subscriptions_table',1); +INSERT INTO `migrations` VALUES (57,'2021_03_08_205030_add_russian_lang',1); +INSERT INTO `migrations` VALUES (58,'2021_03_09_132242_add_currency_id_to_billing_subscriptions_table',1); +INSERT INTO `migrations` VALUES (59,'2021_03_18_113704_change_2fa_column_from_varchar_to_text',1); +INSERT INTO `migrations` VALUES (60,'2021_03_19_221024_add_unique_constraints_on_all_entities',1); +INSERT INTO `migrations` VALUES (61,'2021_03_20_033751_add_invoice_id_to_client_subscriptions_table',1); +INSERT INTO `migrations` VALUES (62,'2021_03_23_233844_add_nullable_constraint_to_recurring_invoice_id',1); +INSERT INTO `migrations` VALUES (63,'2021_03_25_082025_refactor_billing_scriptions_table',1); +INSERT INTO `migrations` VALUES (64,'2021_03_26_201148_add_price_column_to_subscriptions_table',1); +INSERT INTO `migrations` VALUES (65,'2021_04_01_093128_modify_column_on_subscriptions_table',1); +INSERT INTO `migrations` VALUES (66,'2021_04_05_115345_add_trial_duration_to_accounts_table',1); +INSERT INTO `migrations` VALUES (67,'2021_04_05_213802_add_rest_fields_to_webhooks_table',1); +INSERT INTO `migrations` VALUES (68,'2021_04_06_131028_create_licenses_table',1); +INSERT INTO `migrations` VALUES (69,'2021_04_12_095424_stripe_connect_gateway',1); +INSERT INTO `migrations` VALUES (70,'2021_04_13_013424_add_subscription_id_to_activities_table',1); +INSERT INTO `migrations` VALUES (71,'2021_04_22_110240_add_property_to_checkout_gateway_config',1); +INSERT INTO `migrations` VALUES (72,'2021_04_29_085418_add_number_years_active_to_company_users_table',1); +INSERT INTO `migrations` VALUES (73,'2021_05_03_152940_make_braintree_provider_visible',1); +INSERT INTO `migrations` VALUES (74,'2021_05_04_231430_add_task_property_to_companies_table',1); +INSERT INTO `migrations` VALUES (75,'2021_05_05_014713_activate_we_pay',1); +INSERT INTO `migrations` VALUES (76,'2021_05_10_041528_add_recurring_invoice_id_to_activities_table',1); +INSERT INTO `migrations` VALUES (77,'2021_05_27_105157_add_tech_design',1); +INSERT INTO `migrations` VALUES (78,'2021_05_30_100933_make_documents_assigned_user_nullable',1); +INSERT INTO `migrations` VALUES (79,'2021_06_10_221012_add_ninja_portal_column_to_accounts_table',1); +INSERT INTO `migrations` VALUES (80,'2021_06_24_095942_payments_table_currency_nullable',1); +INSERT INTO `migrations` VALUES (81,'2021_07_10_085821_activate_payfast_payment_driver',1); +INSERT INTO `migrations` VALUES (82,'2021_07_19_074503_set_invoice_task_datelog_true_in_companies_table',1); +INSERT INTO `migrations` VALUES (83,'2021_07_20_095537_activate_paytrace_payment_driver',1); +INSERT INTO `migrations` VALUES (84,'2021_07_21_213344_change_english_languages_tables',1); +INSERT INTO `migrations` VALUES (85,'2021_07_21_234227_activate_eway_payment_driver',1); +INSERT INTO `migrations` VALUES (86,'2021_08_03_115024_activate_mollie_payment_driver',1); +INSERT INTO `migrations` VALUES (87,'2021_08_05_235942_add_zelle_payment_type',1); +INSERT INTO `migrations` VALUES (88,'2021_08_07_222435_add_markdown_enabled_column_to_companies_table',1); +INSERT INTO `migrations` VALUES (89,'2021_08_10_034407_add_more_languages',1); +INSERT INTO `migrations` VALUES (90,'2021_08_14_054458_square_payment_driver',1); +INSERT INTO `migrations` VALUES (91,'2021_08_18_220124_use_comma_as_decimal_place_companies_table',1); +INSERT INTO `migrations` VALUES (92,'2021_08_23_101529_recurring_expenses_schema',1); +INSERT INTO `migrations` VALUES (93,'2021_08_25_093105_report_include_drafts_in_companies_table',1); +INSERT INTO `migrations` VALUES (94,'2021_09_05_101209_update_braintree_gateway',1); +INSERT INTO `migrations` VALUES (95,'2021_09_20_233053_set_square_test_mode_boolean',1); +INSERT INTO `migrations` VALUES (96,'2021_09_23_100629_add_currencies',1); +INSERT INTO `migrations` VALUES (97,'2021_09_24_201319_add_mollie_bank_transfer_to_payment_types',1); +INSERT INTO `migrations` VALUES (98,'2021_09_24_211504_add_kbc_to_payment_types',1); +INSERT INTO `migrations` VALUES (99,'2021_09_24_213858_add_bancontact_to_payment_types',1); +INSERT INTO `migrations` VALUES (100,'2021_09_28_154647_activate_gocardless_payment_driver',1); +INSERT INTO `migrations` VALUES (101,'2021_09_29_190258_add_required_client_registration_fields',1); +INSERT INTO `migrations` VALUES (102,'2021_10_04_134908_add_ideal_to_payment_types',1); +INSERT INTO `migrations` VALUES (103,'2021_10_06_044800_updated_bold_and_modern_designs',1); +INSERT INTO `migrations` VALUES (104,'2021_10_07_141737_razorpay',1); +INSERT INTO `migrations` VALUES (105,'2021_10_07_155410_add_hosted_page_to_payment_types',1); +INSERT INTO `migrations` VALUES (106,'2021_10_15_00000_stripe_payment_gateways',1); +INSERT INTO `migrations` VALUES (107,'2021_10_16_135200_add_direct_debit_to_payment_types',1); +INSERT INTO `migrations` VALUES (108,'2021_10_19_142200_add_gateway_type_for_direct_debit',1); +INSERT INTO `migrations` VALUES (109,'2021_10_20_005529_add_filename_to_backups_table',1); +INSERT INTO `migrations` VALUES (110,'2021_11_08_131308_onboarding',1); +INSERT INTO `migrations` VALUES (111,'2021_11_09_115919_update_designs',1); +INSERT INTO `migrations` VALUES (112,'2021_11_10_184847_add_is_migrate_column_to_accounts_table',1); +INSERT INTO `migrations` VALUES (113,'2021_11_11_163121_add_instant_bank_transfer',1); +INSERT INTO `migrations` VALUES (114,'2021_12_20_095542_add_serbian_language_translations',1); +INSERT INTO `migrations` VALUES (115,'2022_01_02_022421_add_slovak_language',1); +INSERT INTO `migrations` VALUES (116,'2022_01_06_061231_add_app_domain_id_to_gateways_table',1); +INSERT INTO `migrations` VALUES (117,'2022_01_18_004856_add_estonian_language',1); +INSERT INTO `migrations` VALUES (118,'2022_01_19_085907_add_platform_column_to_accounts_table',1); +INSERT INTO `migrations` VALUES (119,'2022_01_19_232436_add_kyd_currency',1); +INSERT INTO `migrations` VALUES (120,'2022_01_27_223617_add_client_count_to_accounts_table',1); +INSERT INTO `migrations` VALUES (121,'2022_02_06_091629_add_client_currency_conversion_to_companies_table',1); +INSERT INTO `migrations` VALUES (122,'2022_02_25_015411_update_stripe_apple_domain_config',1); +INSERT INTO `migrations` VALUES (123,'2022_03_09_053508_transaction_events',1); +INSERT INTO `migrations` VALUES (124,'2022_03_24_090728_markdown_email_enabled_wysiwyg_editor',1); +INSERT INTO `migrations` VALUES (125,'2022_03_29_014025_reverse_apple_domain_for_hosted',1); +INSERT INTO `migrations` VALUES (126,'2022_04_14_121548_forte_payment_gateway',1); +INSERT INTO `migrations` VALUES (127,'2022_04_22_115838_client_settings_parse_for_types',1); +INSERT INTO `migrations` VALUES (128,'2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text',1); +INSERT INTO `migrations` VALUES (129,'2022_05_08_004937_heal_stripe_gateway_configuration',1); +INSERT INTO `migrations` VALUES (130,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1); +INSERT INTO `migrations` VALUES (131,'2022_05_18_055442_update_custom_value_four_columns',1); +INSERT INTO `migrations` VALUES (132,'2022_05_18_162152_create_scheduled_jobs_table',1); +INSERT INTO `migrations` VALUES (133,'2022_05_18_162443_create_schedulers_table',1); +INSERT INTO `migrations` VALUES (134,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1); +INSERT INTO `migrations` VALUES (135,'2022_05_28_234651_create_purchase_orders_table',1); +INSERT INTO `migrations` VALUES (136,'2022_05_30_181109_drop_scheduled_jobs_table',1); +INSERT INTO `migrations` VALUES (137,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',1); +INSERT INTO `migrations` VALUES (138,'2022_05_31_101504_inventory_management_schema',1); +INSERT INTO `migrations` VALUES (139,'2022_06_01_215859_set_recurring_client_timestamp',1); +INSERT INTO `migrations` VALUES (140,'2022_06_01_224339_create_purchase_order_invitations_table',1); +INSERT INTO `migrations` VALUES (141,'2022_06_10_030503_set_account_flag_for_react',1); +INSERT INTO `migrations` VALUES (142,'2022_06_16_025156_add_react_switching_flag',1); +INSERT INTO `migrations` VALUES (143,'2022_06_17_082627_change_refresh_token_column_size',1); +INSERT INTO `migrations` VALUES (144,'2022_06_21_104350_fixes_for_description_in_pdf_designs',1); +INSERT INTO `migrations` VALUES (145,'2022_06_22_090547_set_oauth_expiry_column',1); +INSERT INTO `migrations` VALUES (146,'2022_06_24_141018_upgrade_failed_jobs_table',1); +INSERT INTO `migrations` VALUES (147,'2022_06_30_000126_add_flag_to_accounts_table',1); +INSERT INTO `migrations` VALUES (148,'2022_07_06_080127_add_purchase_order_to_expense',1); +INSERT INTO `migrations` VALUES (149,'2022_07_09_235510_add_index_to_payment_hash',1); +INSERT INTO `migrations` VALUES (150,'2022_07_18_033756_fixes_for_date_formats_table_react',1); +INSERT INTO `migrations` VALUES (151,'2022_07_21_023805_add_hebrew_language',1); +INSERT INTO `migrations` VALUES (152,'2022_07_26_091216_add_sms_verification_to_hosted_account',1); +INSERT INTO `migrations` VALUES (153,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',1); +INSERT INTO `migrations` VALUES (154,'2022_07_29_091235_correction_for_companies_table_types',1); +INSERT INTO `migrations` VALUES (155,'2022_08_05_023357_bank_integration',1); +INSERT INTO `migrations` VALUES (156,'2022_08_11_011534_licenses_table_for_self_host',1); +INSERT INTO `migrations` VALUES (157,'2022_08_24_215917_invoice_task_project_companies_table',1); +INSERT INTO `migrations` VALUES (158,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',1); +INSERT INTO `migrations` VALUES (159,'2022_08_28_210111_add_index_to_payments_table',1); +INSERT INTO `migrations` VALUES (160,'2022_09_05_024719_update_designs_for_tech_template',1); +INSERT INTO `migrations` VALUES (161,'2022_09_07_101731_add_reporting_option_to_companies_table',1); +INSERT INTO `migrations` VALUES (162,'2022_09_21_012417_add_threeds_to_braintree',1); +INSERT INTO `migrations` VALUES (163,'2022_09_30_235337_add_idempotency_key_to_payments',1); +INSERT INTO `migrations` VALUES (164,'2022_10_05_205645_add_indexes_to_client_hash',1); +INSERT INTO `migrations` VALUES (165,'2022_10_06_011344_add_key_to_products',1); +INSERT INTO `migrations` VALUES (166,'2022_10_07_065455_add_key_to_company_tokens_table',1); +INSERT INTO `migrations` VALUES (167,'2022_10_10_070137_add_documentable_index',1); +INSERT INTO `migrations` VALUES (168,'2022_10_27_044909_add_user_sms_verification_code',1); +INSERT INTO `migrations` VALUES (169,'2022_11_02_063742_add_verified_number_flag_to_users_table',1); +INSERT INTO `migrations` VALUES (170,'2022_11_04_013539_disabled_upstream_bank_integrations_table',1); +INSERT INTO `migrations` VALUES (171,'2022_11_06_215526_drop_html_backups_column_from_backups_table',1); +INSERT INTO `migrations` VALUES (172,'2022_11_13_034143_bank_transaction_rules_table',1); +INSERT INTO `migrations` VALUES (173,'2022_11_16_093535_calmness_design',1); +INSERT INTO `migrations` VALUES (174,'2022_11_22_215618_lock_tasks_when_invoiced',1); diff --git a/database/schema/mysql-schema.dump b/database/schema/mysql-schema.dump deleted file mode 100644 index e7cd45635d62..000000000000 --- a/database/schema/mysql-schema.dump +++ /dev/null @@ -1,2522 +0,0 @@ -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `accounts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `accounts` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `plan` enum('pro','enterprise','white_label') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `plan_term` enum('month','year') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `plan_started` date DEFAULT NULL, - `plan_paid` date DEFAULT NULL, - `plan_expires` date DEFAULT NULL, - `user_agent` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `payment_id` int(10) unsigned DEFAULT NULL, - `default_company_id` int(10) unsigned NOT NULL, - `trial_started` date DEFAULT NULL, - `trial_plan` enum('pro','enterprise') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `plan_price` decimal(7,2) DEFAULT NULL, - `num_users` smallint(6) NOT NULL DEFAULT 1, - `utm_source` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `utm_medium` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `utm_campaign` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `utm_term` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `utm_content` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `latest_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0.0.0', - `report_errors` tinyint(1) NOT NULL DEFAULT 0, - `referral_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `is_scheduler_running` tinyint(1) NOT NULL DEFAULT 0, - `trial_duration` int(10) unsigned DEFAULT NULL, - `is_onboarding` tinyint(1) NOT NULL DEFAULT 0, - `onboarding` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_migrated` tinyint(1) NOT NULL DEFAULT 0, - `platform` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `hosted_client_count` int(10) unsigned DEFAULT NULL, - `hosted_company_count` int(10) unsigned DEFAULT NULL, - `inapp_transaction_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `set_react_as_default_ap` tinyint(1) NOT NULL DEFAULT 0, - `is_flagged` tinyint(1) NOT NULL DEFAULT 0, - `is_verified_account` tinyint(1) NOT NULL DEFAULT 0, - `account_sms_verification_code` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `account_sms_verification_number` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `account_sms_verified` tinyint(1) NOT NULL DEFAULT 0, - `bank_integration_account_id` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `accounts_payment_id_index` (`payment_id`), - KEY `accounts_key_index` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `activities`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `activities` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `client_contact_id` int(10) unsigned DEFAULT NULL, - `account_id` int(10) unsigned DEFAULT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `payment_id` int(10) unsigned DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `credit_id` int(10) unsigned DEFAULT NULL, - `invitation_id` int(10) unsigned DEFAULT NULL, - `task_id` int(10) unsigned DEFAULT NULL, - `expense_id` int(10) unsigned DEFAULT NULL, - `activity_type_id` int(10) unsigned DEFAULT NULL, - `ip` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `is_system` tinyint(1) NOT NULL DEFAULT 0, - `notes` text COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `token_id` int(10) unsigned DEFAULT NULL, - `quote_id` int(10) unsigned DEFAULT NULL, - `subscription_id` int(10) unsigned DEFAULT NULL, - `recurring_invoice_id` int(10) unsigned DEFAULT NULL, - `recurring_expense_id` int(10) unsigned DEFAULT NULL, - `recurring_quote_id` int(10) unsigned DEFAULT NULL, - `purchase_order_id` int(10) unsigned DEFAULT NULL, - `vendor_contact_id` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `activities_vendor_id_company_id_index` (`vendor_id`,`company_id`), - KEY `activities_project_id_company_id_index` (`project_id`,`company_id`), - KEY `activities_user_id_company_id_index` (`user_id`,`company_id`), - KEY `activities_client_id_company_id_index` (`client_id`,`company_id`), - KEY `activities_payment_id_company_id_index` (`payment_id`,`company_id`), - KEY `activities_invoice_id_company_id_index` (`invoice_id`,`company_id`), - KEY `activities_credit_id_company_id_index` (`credit_id`,`company_id`), - KEY `activities_invitation_id_company_id_index` (`invitation_id`,`company_id`), - KEY `activities_task_id_company_id_index` (`task_id`,`company_id`), - KEY `activities_expense_id_company_id_index` (`expense_id`,`company_id`), - KEY `activities_client_contact_id_company_id_index` (`client_contact_id`,`company_id`), - KEY `activities_company_id_foreign` (`company_id`), - KEY `activities_quote_id_company_id_index` (`quote_id`,`company_id`), - KEY `activities_recurring_invoice_id_company_id_index` (`recurring_invoice_id`,`company_id`), - KEY `activities_purchase_order_id_company_id_index` (`purchase_order_id`,`company_id`), - KEY `activities_vendor_contact_id_company_id_index` (`vendor_contact_id`,`company_id`), - CONSTRAINT `activities_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `backups`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `backups` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `activity_id` int(10) unsigned NOT NULL, - `json_backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `amount` decimal(16,4) NOT NULL, - `filename` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `disk` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `backups_activity_id_foreign` (`activity_id`), - CONSTRAINT `backups_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `activities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bank_companies`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bank_companies` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `bank_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `username` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `bank_companies_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `bank_companies_user_id_foreign` (`user_id`), - KEY `bank_companies_bank_id_foreign` (`bank_id`), - CONSTRAINT `bank_companies_bank_id_foreign` FOREIGN KEY (`bank_id`) REFERENCES `banks` (`id`), - CONSTRAINT `bank_companies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_companies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bank_integrations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bank_integrations` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `account_id` int(10) unsigned NOT NULL, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `provider_name` text COLLATE utf8mb4_unicode_ci NOT NULL, - `provider_id` bigint(20) NOT NULL, - `bank_account_id` bigint(20) NOT NULL, - `bank_account_name` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `bank_account_number` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `bank_account_status` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `bank_account_type` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `balance` decimal(20,6) NOT NULL DEFAULT 0.000000, - `currency` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `nickname` text COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', - `from_date` date DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `disabled_upstream` tinyint(1) NOT NULL DEFAULT 0, - `auto_sync` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `bank_integrations_user_id_foreign` (`user_id`), - KEY `bank_integrations_account_id_foreign` (`account_id`), - KEY `bank_integrations_company_id_foreign` (`company_id`), - CONSTRAINT `bank_integrations_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_integrations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_integrations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bank_subcompanies`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bank_subcompanies` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `bank_company_id` int(10) unsigned NOT NULL, - `account_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `bank_subcompanies_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `bank_subcompanies_user_id_foreign` (`user_id`), - KEY `bank_subcompanies_bank_company_id_foreign` (`bank_company_id`), - CONSTRAINT `bank_subcompanies_bank_company_id_foreign` FOREIGN KEY (`bank_company_id`) REFERENCES `bank_companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_subcompanies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_subcompanies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bank_transaction_rules`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bank_transaction_rules` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `rules` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `auto_convert` tinyint(1) NOT NULL DEFAULT 0, - `matches_on_all` tinyint(1) NOT NULL DEFAULT 0, - `applies_to` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'CREDIT', - `client_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `category_id` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `bank_transaction_rules_user_id_foreign` (`user_id`), - KEY `bank_transaction_rules_company_id_foreign` (`company_id`), - CONSTRAINT `bank_transaction_rules_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_transaction_rules_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bank_transactions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bank_transactions` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `bank_integration_id` bigint(20) unsigned NOT NULL, - `transaction_id` bigint(20) unsigned NOT NULL, - `amount` decimal(20,6) NOT NULL DEFAULT 0.000000, - `currency_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `currency_id` int(10) unsigned DEFAULT NULL, - `account_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `category_id` int(10) unsigned DEFAULT NULL, - `ninja_category_id` int(10) unsigned DEFAULT NULL, - `category_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `base_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `date` date DEFAULT NULL, - `bank_account_id` bigint(20) unsigned NOT NULL, - `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `invoice_ids` text COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', - `expense_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `status_id` int(10) unsigned NOT NULL DEFAULT 1, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `bank_rule_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `bank_transactions_bank_integration_id_foreign` (`bank_integration_id`), - KEY `bank_transactions_user_id_foreign` (`user_id`), - KEY `bank_transactions_company_id_foreign` (`company_id`), - KEY `bank_transactions_transaction_id_index` (`transaction_id`), - KEY `bank_transactions_category_type_index` (`category_type`), - KEY `bank_transactions_base_type_index` (`base_type`), - CONSTRAINT `bank_transactions_bank_integration_id_foreign` FOREIGN KEY (`bank_integration_id`) REFERENCES `bank_integrations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_transactions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `bank_transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `banks`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `banks` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `remote_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `bank_library_id` int(11) NOT NULL DEFAULT 1, - `config` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `client_contacts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `client_contacts` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_verified_at` timestamp NULL DEFAULT NULL, - `confirmation_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_primary` tinyint(1) NOT NULL DEFAULT 0, - `confirmed` tinyint(1) NOT NULL DEFAULT 0, - `last_login` timestamp NULL DEFAULT NULL, - `failed_logins` smallint(6) DEFAULT NULL, - `oauth_user_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `oauth_provider_id` int(10) unsigned DEFAULT NULL, - `google_2fa_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `accepted_terms_version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar_size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_locked` tinyint(1) NOT NULL DEFAULT 0, - `send_email` tinyint(1) NOT NULL DEFAULT 1, - `contact_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `client_contacts_oauth_user_id_unique` (`oauth_user_id`), - UNIQUE KEY `client_contacts_oauth_provider_id_unique` (`oauth_provider_id`), - KEY `client_contacts_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `client_contacts_company_id_email_deleted_at_index` (`company_id`,`email`,`deleted_at`), - KEY `client_contacts_company_id_index` (`company_id`), - KEY `client_contacts_client_id_index` (`client_id`), - KEY `client_contacts_user_id_index` (`user_id`), - KEY `client_contacts_contact_key(20)_index` (`contact_key`(20)), - KEY `client_contacts_email_index` (`email`), - CONSTRAINT `client_contacts_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `client_gateway_tokens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `client_gateway_tokens` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `token` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `routing_number` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `company_gateway_id` int(10) unsigned NOT NULL, - `gateway_customer_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `gateway_type_id` int(10) unsigned NOT NULL, - `is_default` tinyint(1) NOT NULL DEFAULT 0, - `meta` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `client_gateway_tokens_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `client_gateway_tokens_client_id_foreign` (`client_id`), - CONSTRAINT `client_gateway_tokens_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `client_gateway_tokens_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `client_subscriptions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `client_subscriptions` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `subscription_id` int(10) unsigned NOT NULL, - `recurring_invoice_id` int(10) unsigned DEFAULT NULL, - `client_id` int(10) unsigned NOT NULL, - `trial_started` int(10) unsigned DEFAULT NULL, - `trial_ends` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `created_at` timestamp NULL DEFAULT NULL, - `updated_at` timestamp NULL DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `quantity` int(10) unsigned NOT NULL DEFAULT 1, - PRIMARY KEY (`id`), - KEY `client_subscriptions_subscription_id_foreign` (`subscription_id`), - KEY `client_subscriptions_recurring_invoice_id_foreign` (`recurring_invoice_id`), - KEY `client_subscriptions_client_id_foreign` (`client_id`), - KEY `client_subscriptions_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `client_subscriptions_invoice_id_foreign` (`invoice_id`), - CONSTRAINT `client_subscriptions_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`), - CONSTRAINT `client_subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE, - CONSTRAINT `client_subscriptions_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `client_subscriptions_recurring_invoice_id_foreign` FOREIGN KEY (`recurring_invoice_id`) REFERENCES `recurring_invoices` (`id`), - CONSTRAINT `client_subscriptions_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `clients`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `clients` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `client_hash` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `logo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `balance` decimal(20,6) NOT NULL DEFAULT 0.000000, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `credit_balance` decimal(20,6) NOT NULL DEFAULT 0.000000, - `last_login` timestamp NULL DEFAULT NULL, - `industry_id` int(10) unsigned DEFAULT NULL, - `size_id` int(10) unsigned DEFAULT NULL, - `address1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `address2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `country_id` int(10) unsigned DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `shipping_address1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `shipping_address2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `shipping_city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `shipping_state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `shipping_postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `shipping_country_id` int(10) unsigned DEFAULT NULL, - `settings` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `group_settings_id` int(10) unsigned DEFAULT NULL, - `vat_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `id_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `clients_company_id_number_unique` (`company_id`,`number`), - KEY `clients_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `clients_industry_id_foreign` (`industry_id`), - KEY `clients_size_id_foreign` (`size_id`), - KEY `clients_company_id_index` (`company_id`), - KEY `clients_user_id_index` (`user_id`), - KEY `clients_client_hash(20)_index` (`client_hash`(20)), - CONSTRAINT `clients_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `clients_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), - CONSTRAINT `clients_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `companies`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `companies` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `account_id` int(10) unsigned NOT NULL, - `industry_id` int(10) unsigned DEFAULT NULL, - `ip` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `company_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, - `convert_products` tinyint(1) NOT NULL DEFAULT 0, - `fill_products` tinyint(1) NOT NULL DEFAULT 1, - `update_products` tinyint(1) NOT NULL DEFAULT 1, - `show_product_details` tinyint(1) NOT NULL DEFAULT 1, - `client_can_register` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_taxes1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_taxes2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_taxes3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_taxes4` tinyint(1) NOT NULL DEFAULT 0, - `show_product_cost` tinyint(1) NOT NULL DEFAULT 0, - `enabled_tax_rates` int(10) unsigned NOT NULL DEFAULT 0, - `enabled_modules` int(10) unsigned NOT NULL DEFAULT 0, - `enable_product_cost` tinyint(1) NOT NULL DEFAULT 0, - `enable_product_quantity` tinyint(1) NOT NULL DEFAULT 1, - `default_quantity` tinyint(1) NOT NULL DEFAULT 1, - `subdomain` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `db` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `size_id` int(10) unsigned DEFAULT NULL, - `first_day_of_week` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `first_month_of_year` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `portal_mode` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'subdomain', - `portal_domain` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `enable_modules` smallint(6) NOT NULL DEFAULT 0, - `custom_fields` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `settings` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `slack_webhook_url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `google_analytics_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `enabled_item_tax_rates` int(11) NOT NULL DEFAULT 0, - `is_large` tinyint(1) NOT NULL DEFAULT 0, - `enable_shop_api` tinyint(1) NOT NULL DEFAULT 0, - `default_auto_bill` enum('off','always','optin','optout') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off', - `mark_expenses_invoiceable` tinyint(1) NOT NULL DEFAULT 0, - `mark_expenses_paid` tinyint(1) NOT NULL DEFAULT 0, - `invoice_expense_documents` tinyint(1) NOT NULL DEFAULT 0, - `auto_start_tasks` tinyint(1) NOT NULL DEFAULT 0, - `invoice_task_timelog` tinyint(1) NOT NULL DEFAULT 1, - `invoice_task_documents` tinyint(1) NOT NULL DEFAULT 0, - `show_tasks_table` tinyint(1) NOT NULL DEFAULT 0, - `is_disabled` tinyint(1) NOT NULL DEFAULT 0, - `default_task_is_date_based` tinyint(1) NOT NULL DEFAULT 0, - `enable_product_discount` tinyint(1) NOT NULL DEFAULT 0, - `calculate_expense_tax_by_amount` tinyint(1) NOT NULL, - `expense_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `session_timeout` int(11) NOT NULL DEFAULT 0, - `oauth_password_required` tinyint(1) NOT NULL DEFAULT 0, - `invoice_task_datelog` tinyint(1) NOT NULL DEFAULT 1, - `default_password_timeout` int(11) NOT NULL DEFAULT 30, - `show_task_end_date` tinyint(1) NOT NULL DEFAULT 0, - `markdown_enabled` tinyint(1) NOT NULL DEFAULT 1, - `use_comma_as_decimal_place` tinyint(1) NOT NULL DEFAULT 0, - `report_include_drafts` tinyint(1) NOT NULL DEFAULT 0, - `client_registration_fields` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `convert_rate_to_client` tinyint(1) NOT NULL DEFAULT 1, - `markdown_email_enabled` tinyint(1) NOT NULL DEFAULT 0, - `stop_on_unpaid_recurring` tinyint(1) NOT NULL DEFAULT 0, - `use_quote_terms_on_conversion` tinyint(1) NOT NULL DEFAULT 0, - `enable_applying_payments` tinyint(1) NOT NULL DEFAULT 0, - `track_inventory` tinyint(1) NOT NULL DEFAULT 0, - `inventory_notification_threshold` int(11) NOT NULL DEFAULT 0, - `stock_notification` tinyint(1) NOT NULL DEFAULT 1, - `enabled_expense_tax_rates` int(10) unsigned NOT NULL DEFAULT 0, - `invoice_task_project` tinyint(1) NOT NULL DEFAULT 0, - `report_include_deleted` tinyint(1) NOT NULL DEFAULT 0, - `invoice_task_lock` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `companies_company_key_unique` (`company_key`), - KEY `companies_industry_id_foreign` (`industry_id`), - KEY `companies_size_id_foreign` (`size_id`), - KEY `companies_account_id_index` (`account_id`), - KEY `companies_subdomain_portal_mode_index` (`subdomain`,`portal_mode`), - KEY `companies_portal_domain_portal_mode_index` (`portal_domain`,`portal_mode`), - KEY `companies_company_key_index` (`company_key`), - CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `companies_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`), - CONSTRAINT `companies_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `company_gateways`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `company_gateways` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `gateway_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `accepted_credit_cards` int(10) unsigned NOT NULL, - `require_cvv` tinyint(1) NOT NULL DEFAULT 1, - `require_billing_address` tinyint(1) DEFAULT 1, - `require_shipping_address` tinyint(1) DEFAULT 1, - `update_details` tinyint(1) DEFAULT 0, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `config` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `fees_and_limits` text COLLATE utf8mb4_unicode_ci NOT NULL, - `custom_value1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `token_billing` enum('off','always','optin','optout') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off', - `label` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `require_client_name` tinyint(1) NOT NULL DEFAULT 0, - `require_postal_code` tinyint(1) NOT NULL DEFAULT 0, - `require_client_phone` tinyint(1) NOT NULL DEFAULT 0, - `require_contact_name` tinyint(1) NOT NULL DEFAULT 0, - `require_contact_email` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `company_gateways_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `company_gateways_gateway_key_foreign` (`gateway_key`), - KEY `company_gateways_user_id_foreign` (`user_id`), - CONSTRAINT `company_gateways_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `company_gateways_gateway_key_foreign` FOREIGN KEY (`gateway_key`) REFERENCES `gateways` (`key`), - CONSTRAINT `company_gateways_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `company_ledgers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `company_ledgers` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `activity_id` int(10) unsigned DEFAULT NULL, - `adjustment` decimal(20,6) DEFAULT NULL, - `balance` decimal(20,6) DEFAULT NULL, - `notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `hash` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `company_ledgerable_id` int(10) unsigned NOT NULL, - `company_ledgerable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `company_ledgers_company_id_foreign` (`company_id`), - KEY `company_ledgers_client_id_foreign` (`client_id`), - CONSTRAINT `company_ledgers_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `company_ledgers_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `company_tokens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `company_tokens` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `account_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `is_system` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `company_tokens_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `company_tokens_account_id_foreign` (`account_id`), - KEY `company_tokens_user_id_foreign` (`user_id`), - KEY `company_tokens_company_id_index` (`company_id`), - KEY `company_tokens_token_deleted_at_index` (`token`,`deleted_at`), - CONSTRAINT `company_tokens_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `company_tokens_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `company_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `company_user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `company_user` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `account_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `permissions` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `notifications` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `settings` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `slack_webhook_url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `is_owner` tinyint(1) NOT NULL DEFAULT 0, - `is_admin` tinyint(1) NOT NULL DEFAULT 0, - `is_locked` tinyint(1) NOT NULL DEFAULT 0, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `permissions_updated_at` timestamp NOT NULL DEFAULT current_timestamp(), - `ninja_portal_url` text COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - UNIQUE KEY `company_user_company_id_user_id_unique` (`company_id`,`user_id`), - KEY `company_user_account_id_company_id_deleted_at_index` (`account_id`,`company_id`,`deleted_at`), - KEY `company_user_user_id_index` (`user_id`), - CONSTRAINT `company_user_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE, - CONSTRAINT `company_user_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `countries`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `countries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `capital` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `citizenship` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `country_code` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `currency` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `currency_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `currency_sub_unit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `full_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `iso_3166_2` varchar(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `iso_3166_3` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `region_code` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `sub_region_code` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `eea` tinyint(1) NOT NULL DEFAULT 0, - `swap_postal_code` tinyint(1) NOT NULL DEFAULT 0, - `swap_currency_symbol` tinyint(1) NOT NULL DEFAULT 0, - `thousand_separator` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '', - `decimal_separator` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT '', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_invitations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_invitations` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `client_contact_id` int(10) unsigned NOT NULL, - `credit_id` int(10) unsigned NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_date` datetime DEFAULT NULL, - `sent_date` datetime DEFAULT NULL, - `viewed_date` datetime DEFAULT NULL, - `opened_date` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `signature_ip` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `credit_invitations_client_contact_id_credit_id_unique` (`client_contact_id`,`credit_id`), - KEY `credit_invitations_user_id_foreign` (`user_id`), - KEY `credit_invitations_company_id_foreign` (`company_id`), - KEY `credit_invitations_deleted_at_credit_id_company_id_index` (`deleted_at`,`credit_id`,`company_id`), - KEY `credit_invitations_credit_id_index` (`credit_id`), - KEY `credit_invitations_key_index` (`key`), - KEY `credit_invitations_message_id_index` (`message_id`), - CONSTRAINT `credit_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `credit_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `credit_invitations_credit_id_foreign` FOREIGN KEY (`credit_id`) REFERENCES `credits` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `credit_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credits`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credits` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `status_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `recurring_id` int(10) unsigned DEFAULT NULL, - `design_id` int(10) unsigned DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `last_sent_date` datetime DEFAULT NULL, - `due_date` date DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `custom_surcharge1` decimal(20,6) DEFAULT NULL, - `custom_surcharge2` decimal(20,6) DEFAULT NULL, - `custom_surcharge3` decimal(20,6) DEFAULT NULL, - `custom_surcharge4` decimal(20,6) DEFAULT NULL, - `custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `amount` decimal(20,6) NOT NULL, - `balance` decimal(20,6) NOT NULL, - `partial` decimal(20,6) DEFAULT NULL, - `partial_due_date` datetime DEFAULT NULL, - `last_viewed` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `reminder1_sent` date DEFAULT NULL, - `reminder2_sent` date DEFAULT NULL, - `reminder3_sent` date DEFAULT NULL, - `reminder_last_sent` date DEFAULT NULL, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `subscription_id` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `credits_company_id_number_unique` (`company_id`,`number`), - KEY `credits_user_id_foreign` (`user_id`), - KEY `credits_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `credits_client_id_index` (`client_id`), - KEY `credits_company_id_index` (`company_id`), - CONSTRAINT `credits_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `credits_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `credits_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `currencies`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `currencies` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `symbol` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `precision` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `thousand_separator` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `decimal_separator` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `swap_currency_symbol` tinyint(1) NOT NULL DEFAULT 0, - `exchange_rate` decimal(13,6) NOT NULL DEFAULT 1.000000, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `date_formats`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `date_formats` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `format` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `format_moment` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `format_dart` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `datetime_formats`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `datetime_formats` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `format` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `format_moment` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `format_dart` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `designs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `designs` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `is_custom` tinyint(1) NOT NULL DEFAULT 1, - `is_active` tinyint(1) NOT NULL DEFAULT 1, - `design` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `designs_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `designs_company_id_index` (`company_id`), - CONSTRAINT `designs_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `documents`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `documents` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `preview` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `disk` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `hash` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `size` int(10) unsigned DEFAULT NULL, - `width` int(10) unsigned DEFAULT NULL, - `height` int(10) unsigned DEFAULT NULL, - `is_default` tinyint(1) NOT NULL DEFAULT 0, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `documentable_id` int(10) unsigned NOT NULL, - `documentable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `is_public` tinyint(1) NOT NULL DEFAULT 1, - PRIMARY KEY (`id`), - KEY `documents_company_id_index` (`company_id`), - KEY `documents_documentable_id_documentable_type_deleted_at_index` (`documentable_id`,`documentable_type`,`deleted_at`), - CONSTRAINT `documents_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `expense_categories`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `expense_categories` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `company_id` int(10) unsigned NOT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#fff', - `bank_category_id` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `expense_categories_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `expense_categories_company_id_index` (`company_id`), - CONSTRAINT `expense_categories_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `expenses`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `expenses` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `bank_id` int(10) unsigned DEFAULT NULL, - `invoice_currency_id` int(10) unsigned DEFAULT NULL, - `currency_id` int(10) unsigned DEFAULT NULL, - `category_id` int(10) unsigned DEFAULT NULL, - `payment_type_id` int(10) unsigned DEFAULT NULL, - `recurring_expense_id` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `amount` decimal(20,6) NOT NULL, - `foreign_amount` decimal(20,6) NOT NULL, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `date` date DEFAULT NULL, - `payment_date` date DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `transaction_reference` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `should_be_invoiced` tinyint(1) NOT NULL DEFAULT 0, - `invoice_documents` tinyint(1) NOT NULL DEFAULT 1, - `transaction_id` bigint(20) unsigned DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `tax_amount1` decimal(20,6) NOT NULL DEFAULT 1.000000, - `tax_amount2` decimal(20,6) NOT NULL DEFAULT 1.000000, - `tax_amount3` decimal(20,6) NOT NULL DEFAULT 1.000000, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `calculate_tax_by_amount` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `expenses_company_id_number_unique` (`company_id`,`number`), - KEY `expenses_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `expenses_user_id_foreign` (`user_id`), - KEY `expenses_company_id_index` (`company_id`), - KEY `expenses_invoice_id_deleted_at_index` (`invoice_id`,`deleted_at`), - CONSTRAINT `expenses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `failed_jobs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `failed_jobs` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `uuid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, - `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, - `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), - PRIMARY KEY (`id`), - UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `gateway_types`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gateway_types` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `alias` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `gateways`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gateways` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `provider` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `visible` tinyint(1) NOT NULL DEFAULT 1, - `sort_order` int(10) unsigned NOT NULL DEFAULT 10000, - `site_url` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_offsite` tinyint(1) NOT NULL DEFAULT 0, - `is_secure` tinyint(1) NOT NULL DEFAULT 0, - `fields` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `default_gateway_type_id` int(10) unsigned NOT NULL DEFAULT 1, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `gateways_key_unique` (`key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `group_settings`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `group_settings` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `settings` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_default` tinyint(1) NOT NULL DEFAULT 0, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `group_settings_company_id_deleted_at_index` (`company_id`,`deleted_at`), - CONSTRAINT `group_settings_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `industries`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `industries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `invoice_invitations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `invoice_invitations` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `client_contact_id` int(10) unsigned NOT NULL, - `invoice_id` int(10) unsigned NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_date` datetime DEFAULT NULL, - `sent_date` datetime DEFAULT NULL, - `viewed_date` datetime DEFAULT NULL, - `opened_date` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `signature_ip` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `invoice_invitations_client_contact_id_invoice_id_unique` (`client_contact_id`,`invoice_id`), - KEY `invoice_invitations_user_id_foreign` (`user_id`), - KEY `invoice_invitations_company_id_foreign` (`company_id`), - KEY `invoice_invitations_deleted_at_invoice_id_company_id_index` (`deleted_at`,`invoice_id`,`company_id`), - KEY `invoice_invitations_invoice_id_index` (`invoice_id`), - KEY `invoice_invitations_message_id_index` (`message_id`), - KEY `invoice_invitations_key_deleted_at_index` (`key`,`deleted_at`), - CONSTRAINT `invoice_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoice_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoice_invitations_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoice_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `invoices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `invoices` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `status_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `recurring_id` int(10) unsigned DEFAULT NULL, - `design_id` int(10) unsigned DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `last_sent_date` date DEFAULT NULL, - `due_date` datetime DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `custom_surcharge1` decimal(20,6) DEFAULT NULL, - `custom_surcharge2` decimal(20,6) DEFAULT NULL, - `custom_surcharge3` decimal(20,6) DEFAULT NULL, - `custom_surcharge4` decimal(20,6) DEFAULT NULL, - `custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `amount` decimal(20,6) NOT NULL, - `balance` decimal(20,6) NOT NULL, - `partial` decimal(20,6) DEFAULT NULL, - `partial_due_date` datetime DEFAULT NULL, - `last_viewed` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `reminder1_sent` date DEFAULT NULL, - `reminder2_sent` date DEFAULT NULL, - `reminder3_sent` date DEFAULT NULL, - `reminder_last_sent` date DEFAULT NULL, - `auto_bill_enabled` tinyint(1) NOT NULL DEFAULT 0, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `subscription_id` int(10) unsigned DEFAULT NULL, - `auto_bill_tries` smallint(6) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `invoices_company_id_number_unique` (`company_id`,`number`), - KEY `invoices_user_id_foreign` (`user_id`), - KEY `invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `invoices_client_id_index` (`client_id`), - KEY `invoices_company_id_index` (`company_id`), - KEY `invoices_recurring_id_index` (`recurring_id`), - KEY `invoices_status_id_balance_index` (`status_id`,`balance`), - CONSTRAINT `invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `jobs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `jobs` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, - `attempts` tinyint(3) unsigned NOT NULL, - `reserved_at` int(10) unsigned DEFAULT NULL, - `available_at` int(10) unsigned NOT NULL, - `created_at` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`), - KEY `jobs_queue_index` (`queue`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `languages`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `languages` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `licenses`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `licenses` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created_at` timestamp NULL DEFAULT NULL, - `updated_at` timestamp NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `license_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_claimed` tinyint(1) DEFAULT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `product_id` int(10) unsigned DEFAULT NULL, - `recurring_invoice_id` bigint(20) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `licenses_license_key_unique` (`license_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `migrations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `migrations` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `batch` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `password_resets`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `password_resets` ( - `email` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL, - `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp NULL DEFAULT NULL, - KEY `password_resets_email_index` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `payment_hashes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payment_hashes` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `hash` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, - `fee_total` decimal(16,4) NOT NULL, - `fee_invoice_id` int(10) unsigned DEFAULT NULL, - `data` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `payment_id` int(10) unsigned DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `payment_hashes_payment_id_foreign` (`payment_id`), - KEY `payment_hashes_hash_index` (`hash`), - CONSTRAINT `payment_hashes_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `payment_libraries`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payment_libraries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `visible` tinyint(1) NOT NULL DEFAULT 1, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `payment_terms`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payment_terms` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `num_days` int(11) DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `company_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `payment_terms_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `payment_terms_user_id_foreign` (`user_id`), - CONSTRAINT `payment_terms_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `payment_terms_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `payment_types`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payment_types` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `gateway_type_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `paymentables`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `paymentables` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `payment_id` int(10) unsigned NOT NULL, - `paymentable_id` int(10) unsigned NOT NULL, - `amount` decimal(16,4) NOT NULL DEFAULT 0.0000, - `refunded` decimal(16,4) NOT NULL DEFAULT 0.0000, - `paymentable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp NULL DEFAULT NULL, - `updated_at` timestamp NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `paymentables_payment_id_foreign` (`payment_id`), - KEY `paymentables_paymentable_id_index` (`paymentable_id`), - CONSTRAINT `paymentables_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `payments`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payments` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `client_contact_id` int(10) unsigned DEFAULT NULL, - `invitation_id` int(10) unsigned DEFAULT NULL, - `company_gateway_id` int(10) unsigned DEFAULT NULL, - `gateway_type_id` int(10) unsigned DEFAULT NULL, - `type_id` int(10) unsigned DEFAULT NULL, - `status_id` int(10) unsigned NOT NULL, - `amount` decimal(20,6) NOT NULL DEFAULT 0.000000, - `refunded` decimal(20,6) NOT NULL DEFAULT 0.000000, - `applied` decimal(20,6) NOT NULL DEFAULT 0.000000, - `date` date DEFAULT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `payer_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `is_manual` tinyint(1) NOT NULL DEFAULT 0, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `currency_id` int(10) unsigned NOT NULL, - `exchange_currency_id` int(10) unsigned DEFAULT NULL, - `meta` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `transaction_id` bigint(20) unsigned DEFAULT NULL, - `idempotency_key` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `payments_company_id_number_unique` (`company_id`,`number`), - UNIQUE KEY `payments_company_id_idempotency_key_unique` (`company_id`,`idempotency_key`), - KEY `payments_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `payments_client_contact_id_foreign` (`client_contact_id`), - KEY `payments_company_gateway_id_foreign` (`company_gateway_id`), - KEY `payments_user_id_foreign` (`user_id`), - KEY `payments_company_id_index` (`company_id`), - KEY `payments_client_id_index` (`client_id`), - KEY `payments_status_id_index` (`status_id`), - KEY `payments_transaction_reference_index` (`transaction_reference`), - KEY `payments_idempotency_key_index` (`idempotency_key`), - CONSTRAINT `payments_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `payments_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `payments_company_gateway_id_foreign` FOREIGN KEY (`company_gateway_id`) REFERENCES `company_gateways` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `payments_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `payments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `products`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `products` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `product_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `cost` decimal(20,6) NOT NULL DEFAULT 0.000000, - `price` decimal(20,6) NOT NULL DEFAULT 0.000000, - `quantity` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `in_stock_quantity` int(11) NOT NULL DEFAULT 0, - `stock_notification` tinyint(1) NOT NULL DEFAULT 1, - `stock_notification_threshold` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `products_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `products_user_id_foreign` (`user_id`), - KEY `products_company_id_index` (`company_id`), - KEY `pro_co_us_up_index` (`company_id`,`user_id`,`assigned_user_id`,`updated_at`), - KEY `products_product_key_company_id_index` (`product_key`,`company_id`), - CONSTRAINT `products_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `products_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `projects`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `task_rate` decimal(20,6) NOT NULL DEFAULT 0.000000, - `due_date` date DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `budgeted_hours` decimal(20,6) NOT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#fff', - PRIMARY KEY (`id`), - UNIQUE KEY `projects_company_id_number_unique` (`company_id`,`number`), - KEY `projects_user_id_foreign` (`user_id`), - KEY `projects_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `projects_company_id_index` (`company_id`), - CONSTRAINT `projects_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `projects_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `purchase_order_invitations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `purchase_order_invitations` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `vendor_contact_id` int(10) unsigned NOT NULL, - `purchase_order_id` bigint(20) unsigned NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_date` datetime DEFAULT NULL, - `sent_date` datetime DEFAULT NULL, - `viewed_date` datetime DEFAULT NULL, - `opened_date` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `vendor_purchase_unique` (`vendor_contact_id`,`purchase_order_id`), - KEY `purchase_order_invitations_user_id_foreign` (`user_id`), - KEY `purchase_order_invitations_company_id_foreign` (`company_id`), - KEY `vendor_purchase_company_index` (`deleted_at`,`purchase_order_id`,`company_id`), - KEY `purchase_order_invitations_purchase_order_id_index` (`purchase_order_id`), - KEY `purchase_order_invitations_key_index` (`key`), - KEY `purchase_order_invitations_message_id_index` (`message_id`), - CONSTRAINT `purchase_order_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `purchase_order_invitations_purchase_order_id_foreign` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `purchase_order_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `purchase_order_invitations_vendor_contact_id_foreign` FOREIGN KEY (`vendor_contact_id`) REFERENCES `vendor_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `purchase_orders`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `purchase_orders` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `status_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `recurring_id` int(10) unsigned DEFAULT NULL, - `design_id` int(10) unsigned DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `last_sent_date` datetime DEFAULT NULL, - `due_date` date DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `reminder1_sent` date DEFAULT NULL, - `reminder2_sent` date DEFAULT NULL, - `reminder3_sent` date DEFAULT NULL, - `reminder_last_sent` date DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `custom_surcharge1` decimal(20,6) DEFAULT NULL, - `custom_surcharge2` decimal(20,6) DEFAULT NULL, - `custom_surcharge3` decimal(20,6) DEFAULT NULL, - `custom_surcharge4` decimal(20,6) DEFAULT NULL, - `custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `balance` decimal(20,6) NOT NULL, - `partial` decimal(20,6) DEFAULT NULL, - `amount` decimal(20,6) NOT NULL, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `partial_due_date` datetime DEFAULT NULL, - `last_viewed` datetime DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `created_at` timestamp NULL DEFAULT NULL, - `updated_at` timestamp NULL DEFAULT NULL, - `expense_id` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `purchase_orders_user_id_foreign` (`user_id`), - KEY `purchase_orders_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `purchase_orders_client_id_index` (`client_id`), - KEY `purchase_orders_company_id_index` (`company_id`), - KEY `purchase_orders_expense_id_index` (`expense_id`), - CONSTRAINT `purchase_orders_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `purchase_orders_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `purchase_orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `quote_invitations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `quote_invitations` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `client_contact_id` int(10) unsigned NOT NULL, - `quote_id` int(10) unsigned NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_date` datetime DEFAULT NULL, - `sent_date` datetime DEFAULT NULL, - `viewed_date` datetime DEFAULT NULL, - `opened_date` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `signature_ip` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `quote_invitations_client_contact_id_quote_id_unique` (`client_contact_id`,`quote_id`), - KEY `quote_invitations_user_id_foreign` (`user_id`), - KEY `quote_invitations_company_id_foreign` (`company_id`), - KEY `quote_invitations_deleted_at_quote_id_company_id_index` (`deleted_at`,`quote_id`,`company_id`), - KEY `quote_invitations_quote_id_index` (`quote_id`), - KEY `quote_invitations_key_index` (`key`), - KEY `quote_invitations_message_id_index` (`message_id`), - CONSTRAINT `quote_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `quote_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `quote_invitations_quote_id_foreign` FOREIGN KEY (`quote_id`) REFERENCES `quotes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `quote_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `quotes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `quotes` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `status_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `recurring_id` int(10) unsigned DEFAULT NULL, - `design_id` int(10) unsigned DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `last_sent_date` date DEFAULT NULL, - `due_date` datetime DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_surcharge1` decimal(20,6) DEFAULT NULL, - `custom_surcharge2` decimal(20,6) DEFAULT NULL, - `custom_surcharge3` decimal(20,6) DEFAULT NULL, - `custom_surcharge4` decimal(20,6) DEFAULT NULL, - `custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `amount` decimal(20,6) NOT NULL, - `balance` decimal(20,6) NOT NULL, - `partial` decimal(20,6) DEFAULT NULL, - `partial_due_date` datetime DEFAULT NULL, - `last_viewed` datetime DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `reminder1_sent` date DEFAULT NULL, - `reminder2_sent` date DEFAULT NULL, - `reminder3_sent` date DEFAULT NULL, - `reminder_last_sent` date DEFAULT NULL, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `subscription_id` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `quotes_company_id_number_unique` (`company_id`,`number`), - KEY `quotes_user_id_foreign` (`user_id`), - KEY `quotes_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `quotes_client_id_index` (`client_id`), - KEY `quotes_company_id_index` (`company_id`), - KEY `quotes_company_id_updated_at_index` (`company_id`,`updated_at`), - CONSTRAINT `quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `recurring_expenses`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `recurring_expenses` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned NOT NULL, - `status_id` int(10) unsigned NOT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `bank_id` int(10) unsigned DEFAULT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `payment_type_id` int(10) unsigned DEFAULT NULL, - `recurring_expense_id` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 1, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `payment_date` date DEFAULT NULL, - `should_be_invoiced` tinyint(1) NOT NULL DEFAULT 0, - `invoice_documents` tinyint(1) NOT NULL DEFAULT 0, - `transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `category_id` int(10) unsigned DEFAULT NULL, - `calculate_tax_by_amount` tinyint(1) NOT NULL DEFAULT 0, - `tax_amount1` decimal(20,6) DEFAULT NULL, - `tax_amount2` decimal(20,6) DEFAULT NULL, - `tax_amount3` decimal(20,6) DEFAULT NULL, - `tax_rate1` decimal(20,6) DEFAULT NULL, - `tax_rate2` decimal(20,6) DEFAULT NULL, - `tax_rate3` decimal(20,6) DEFAULT NULL, - `amount` decimal(20,6) DEFAULT NULL, - `foreign_amount` decimal(20,6) DEFAULT NULL, - `exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `invoice_currency_id` int(10) unsigned DEFAULT NULL, - `currency_id` int(10) unsigned DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `transaction_reference` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `frequency_id` int(10) unsigned NOT NULL, - `last_sent_date` datetime DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `remaining_cycles` int(11) DEFAULT NULL, - `next_send_date_client` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `recurring_expenses_company_id_number_unique` (`company_id`,`number`), - KEY `recurring_expenses_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `recurring_expenses_user_id_foreign` (`user_id`), - KEY `recurring_expenses_company_id_index` (`company_id`), - CONSTRAINT `recurring_expenses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `recurring_invoice_invitations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `recurring_invoice_invitations` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `client_contact_id` int(10) unsigned NOT NULL, - `recurring_invoice_id` int(10) unsigned NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_date` datetime DEFAULT NULL, - `sent_date` datetime DEFAULT NULL, - `viewed_date` datetime DEFAULT NULL, - `opened_date` datetime DEFAULT NULL, - `email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `cli_rec` (`client_contact_id`,`recurring_invoice_id`), - KEY `recurring_invoice_invitations_user_id_foreign` (`user_id`), - KEY `recurring_invoice_invitations_company_id_foreign` (`company_id`), - KEY `rec_co_del` (`deleted_at`,`recurring_invoice_id`,`company_id`), - KEY `recurring_invoice_invitations_recurring_invoice_id_index` (`recurring_invoice_id`), - KEY `recurring_invoice_invitations_key_index` (`key`), - CONSTRAINT `recurring_invoice_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_invoice_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_invoice_invitations_recurring_invoice_id_foreign` FOREIGN KEY (`recurring_invoice_id`) REFERENCES `recurring_invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_invoice_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `recurring_invoices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `recurring_invoices` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `status_id` int(10) unsigned NOT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `due_date` datetime DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `amount` decimal(20,6) NOT NULL, - `balance` decimal(20,6) NOT NULL, - `partial` decimal(16,4) DEFAULT NULL, - `last_viewed` datetime DEFAULT NULL, - `frequency_id` int(10) unsigned NOT NULL, - `last_sent_date` datetime DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `remaining_cycles` int(11) DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `auto_bill` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off', - `auto_bill_enabled` tinyint(1) NOT NULL DEFAULT 0, - `design_id` int(10) unsigned DEFAULT NULL, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge1` decimal(20,6) DEFAULT NULL, - `custom_surcharge2` decimal(20,6) DEFAULT NULL, - `custom_surcharge3` decimal(20,6) DEFAULT NULL, - `custom_surcharge4` decimal(20,6) DEFAULT NULL, - `custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0, - `due_date_days` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `partial_due_date` date DEFAULT NULL, - `exchange_rate` decimal(13,6) NOT NULL DEFAULT 1.000000, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `subscription_id` int(10) unsigned DEFAULT NULL, - `next_send_date_client` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `recurring_invoices_company_id_number_unique` (`company_id`,`number`), - KEY `recurring_invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `recurring_invoices_user_id_foreign` (`user_id`), - KEY `recurring_invoices_client_id_index` (`client_id`), - KEY `recurring_invoices_company_id_index` (`company_id`), - KEY `recurring_invoices_status_id_index` (`status_id`), - CONSTRAINT `recurring_invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `recurring_quote_invitations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `recurring_quote_invitations` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `client_contact_id` int(10) unsigned NOT NULL, - `recurring_quote_id` int(10) unsigned NOT NULL, - `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `signature_date` datetime DEFAULT NULL, - `sent_date` datetime DEFAULT NULL, - `viewed_date` datetime DEFAULT NULL, - `opened_date` datetime DEFAULT NULL, - `email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `cli_rec_q` (`client_contact_id`,`recurring_quote_id`), - KEY `recurring_quote_invitations_user_id_foreign` (`user_id`), - KEY `recurring_quote_invitations_company_id_foreign` (`company_id`), - KEY `rec_co_del_q` (`deleted_at`,`recurring_quote_id`,`company_id`), - KEY `recurring_quote_invitations_recurring_quote_id_index` (`recurring_quote_id`), - KEY `recurring_quote_invitations_key_index` (`key`), - CONSTRAINT `recurring_quote_invitations_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_quote_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_quote_invitations_recurring_quote_id_foreign` FOREIGN KEY (`recurring_quote_id`) REFERENCES `recurring_invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_quote_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `recurring_quotes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `recurring_quotes` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `vendor_id` int(10) unsigned DEFAULT NULL, - `status_id` int(10) unsigned NOT NULL, - `discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `date` date DEFAULT NULL, - `due_date` datetime DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000, - `tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000, - `total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `amount` decimal(20,6) NOT NULL DEFAULT 0.000000, - `balance` decimal(20,6) NOT NULL DEFAULT 0.000000, - `last_viewed` datetime DEFAULT NULL, - `frequency_id` int(10) unsigned NOT NULL, - `last_sent_date` datetime DEFAULT NULL, - `next_send_date` datetime DEFAULT NULL, - `remaining_cycles` int(10) unsigned DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `auto_bill` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'off', - `auto_bill_enabled` tinyint(1) NOT NULL DEFAULT 0, - `paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000, - `custom_surcharge1` decimal(20,6) DEFAULT NULL, - `custom_surcharge2` decimal(20,6) DEFAULT NULL, - `custom_surcharge3` decimal(20,6) DEFAULT NULL, - `custom_surcharge4` decimal(20,6) DEFAULT NULL, - `custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0, - `custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0, - `due_date_days` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `exchange_rate` decimal(13,6) NOT NULL DEFAULT 1.000000, - `partial` decimal(16,4) DEFAULT NULL, - `partial_due_date` date DEFAULT NULL, - `subscription_id` int(10) unsigned DEFAULT NULL, - `uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 1, - PRIMARY KEY (`id`), - KEY `recurring_quotes_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `recurring_quotes_user_id_foreign` (`user_id`), - KEY `recurring_quotes_client_id_index` (`client_id`), - KEY `recurring_quotes_company_id_index` (`company_id`), - KEY `recurring_quotes_status_id_index` (`status_id`), - CONSTRAINT `recurring_quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `recurring_quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `schedulers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `schedulers` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `paused` tinyint(1) NOT NULL DEFAULT 0, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `repeat_every` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `start_from` timestamp NULL DEFAULT NULL, - `scheduled_run` timestamp NULL DEFAULT NULL, - `company_id` bigint(20) unsigned NOT NULL, - `created_at` timestamp NULL DEFAULT NULL, - `updated_at` timestamp NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `action_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `action_class` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `parameters` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `schedulers_action_name_index` (`action_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `sizes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sizes` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `subscriptions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `subscriptions` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `product_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `frequency_id` int(10) unsigned DEFAULT NULL, - `auto_bill` text COLLATE utf8mb4_unicode_ci DEFAULT '', - `promo_code` text COLLATE utf8mb4_unicode_ci DEFAULT '', - `promo_discount` double(8,2) NOT NULL DEFAULT 0.00, - `is_amount_discount` tinyint(1) NOT NULL DEFAULT 0, - `allow_cancellation` tinyint(1) NOT NULL DEFAULT 1, - `per_seat_enabled` tinyint(1) NOT NULL DEFAULT 0, - `min_seats_limit` int(10) unsigned NOT NULL, - `max_seats_limit` int(10) unsigned NOT NULL, - `trial_enabled` tinyint(1) NOT NULL DEFAULT 0, - `trial_duration` int(10) unsigned NOT NULL, - `allow_query_overrides` tinyint(1) NOT NULL DEFAULT 0, - `allow_plan_changes` tinyint(1) NOT NULL DEFAULT 0, - `plan_map` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `refund_period` int(10) unsigned DEFAULT NULL, - `webhook_configuration` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp NULL DEFAULT NULL, - `updated_at` timestamp NULL DEFAULT NULL, - `currency_id` int(10) unsigned DEFAULT NULL, - `recurring_product_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `group_id` int(10) unsigned DEFAULT NULL, - `price` decimal(20,6) NOT NULL DEFAULT 0.000000, - `promo_price` decimal(20,6) NOT NULL DEFAULT 0.000000, - `registration_required` tinyint(1) NOT NULL DEFAULT 0, - `optional_product_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `optional_recurring_product_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `subscriptions_company_id_name_unique` (`company_id`,`name`), - KEY `billing_subscriptions_company_id_deleted_at_index` (`company_id`,`deleted_at`), - CONSTRAINT `billing_subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `system_logs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `system_logs` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `category_id` int(10) unsigned DEFAULT NULL, - `event_id` int(10) unsigned DEFAULT NULL, - `type_id` int(10) unsigned DEFAULT NULL, - `log` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `system_logs_company_id_foreign` (`company_id`), - KEY `system_logs_client_id_foreign` (`client_id`), - CONSTRAINT `system_logs_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `system_logs_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `task_statuses`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `task_statuses` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `company_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `status_sort_order` int(11) DEFAULT NULL, - `color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#fff', - `status_order` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `task_statuses_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `task_statuses_user_id_foreign` (`user_id`), - CONSTRAINT `task_statuses_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `task_statuses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `tasks`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tasks` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `client_id` int(10) unsigned DEFAULT NULL, - `invoice_id` int(10) unsigned DEFAULT NULL, - `project_id` int(10) unsigned DEFAULT NULL, - `status_id` int(10) unsigned DEFAULT NULL, - `status_sort_order` int(11) DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `duration` int(10) unsigned DEFAULT NULL, - `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `is_running` tinyint(1) NOT NULL DEFAULT 0, - `time_log` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `rate` decimal(20,6) NOT NULL DEFAULT 0.000000, - `invoice_documents` tinyint(1) NOT NULL DEFAULT 0, - `is_date_based` tinyint(1) NOT NULL DEFAULT 0, - `status_order` int(11) DEFAULT NULL, - `invoice_lock` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `tasks_company_id_number_unique` (`company_id`,`number`), - KEY `tasks_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `tasks_user_id_foreign` (`user_id`), - KEY `tasks_invoice_id_foreign` (`invoice_id`), - KEY `tasks_client_id_foreign` (`client_id`), - KEY `tasks_company_id_index` (`company_id`), - CONSTRAINT `tasks_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `tasks_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `tasks_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `tax_rates`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tax_rates` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, - `rate` decimal(20,6) NOT NULL DEFAULT 0.000000, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `tax_rates_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `tax_rates_user_id_foreign` (`user_id`), - KEY `tax_rates_company_id_index` (`company_id`), - CONSTRAINT `tax_rates_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `tax_rates_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `timezones`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `timezones` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `location` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `utc_offset` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `transaction_events`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `transaction_events` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `client_id` int(10) unsigned NOT NULL, - `invoice_id` int(10) unsigned NOT NULL, - `payment_id` int(10) unsigned NOT NULL, - `credit_id` int(10) unsigned NOT NULL, - `client_balance` decimal(16,4) NOT NULL DEFAULT 0.0000, - `client_paid_to_date` decimal(16,4) NOT NULL DEFAULT 0.0000, - `client_credit_balance` decimal(16,4) NOT NULL DEFAULT 0.0000, - `invoice_balance` decimal(16,4) NOT NULL DEFAULT 0.0000, - `invoice_amount` decimal(16,4) NOT NULL DEFAULT 0.0000, - `invoice_partial` decimal(16,4) NOT NULL DEFAULT 0.0000, - `invoice_paid_to_date` decimal(16,4) NOT NULL DEFAULT 0.0000, - `invoice_status` int(10) unsigned DEFAULT NULL, - `payment_amount` decimal(16,4) NOT NULL DEFAULT 0.0000, - `payment_applied` decimal(16,4) NOT NULL DEFAULT 0.0000, - `payment_refunded` decimal(16,4) NOT NULL DEFAULT 0.0000, - `payment_status` int(10) unsigned DEFAULT NULL, - `paymentables` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `event_id` int(10) unsigned NOT NULL, - `timestamp` int(10) unsigned NOT NULL, - `payment_request` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `metadata` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `credit_balance` decimal(16,4) NOT NULL DEFAULT 0.0000, - `credit_amount` decimal(16,4) NOT NULL DEFAULT 0.0000, - `credit_status` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `transaction_events_client_id_index` (`client_id`), - CONSTRAINT `transaction_events_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `users` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `account_id` int(10) unsigned NOT NULL, - `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `ip` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `device_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, - `email_verified_at` timestamp NULL DEFAULT NULL, - `confirmation_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `theme_id` int(11) DEFAULT NULL, - `failed_logins` smallint(6) DEFAULT NULL, - `referral_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `oauth_user_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `oauth_user_token` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `oauth_provider_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `google_2fa_secret` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `accepted_terms_version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar_width` int(10) unsigned DEFAULT NULL, - `avatar_height` int(10) unsigned DEFAULT NULL, - `avatar_size` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `last_login` datetime DEFAULT NULL, - `signature` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `oauth_user_refresh_token` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `last_confirmed_email_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `has_password` tinyint(1) NOT NULL DEFAULT 0, - `oauth_user_token_expiry` datetime DEFAULT NULL, - `sms_verification_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `verified_phone_number` tinyint(1) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `users_email_unique` (`email`), - UNIQUE KEY `users_oauth_user_id_oauth_provider_id_unique` (`oauth_user_id`,`oauth_provider_id`), - KEY `users_account_id_index` (`account_id`), - CONSTRAINT `users_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `vendor_contacts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `vendor_contacts` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned NOT NULL, - `user_id` int(10) unsigned NOT NULL, - `vendor_id` int(10) unsigned NOT NULL, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `is_primary` tinyint(1) NOT NULL DEFAULT 0, - `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `send_email` tinyint(1) NOT NULL DEFAULT 0, - `email_verified_at` timestamp NULL DEFAULT NULL, - `confirmation_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `confirmed` tinyint(1) NOT NULL DEFAULT 0, - `last_login` timestamp NULL DEFAULT NULL, - `failed_logins` smallint(6) DEFAULT NULL, - `oauth_user_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `oauth_provider_id` int(10) unsigned DEFAULT NULL, - `google_2fa_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `accepted_terms_version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `avatar_size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_locked` tinyint(1) NOT NULL DEFAULT 0, - `contact_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `vendor_contacts_oauth_user_id_unique` (`oauth_user_id`), - UNIQUE KEY `vendor_contacts_oauth_provider_id_unique` (`oauth_provider_id`), - KEY `vendor_contacts_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `vendor_contacts_user_id_foreign` (`user_id`), - KEY `vendor_contacts_vendor_id_index` (`vendor_id`), - KEY `vendor_contacts_company_id_email_deleted_at_index` (`company_id`,`email`,`deleted_at`), - KEY `vendor_contacts_contact_key(20)_index` (`contact_key`(20)), - KEY `vendor_contacts_email_index` (`email`), - CONSTRAINT `vendor_contacts_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `vendor_contacts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `vendor_contacts_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `vendors`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `vendors` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp NULL DEFAULT NULL, - `user_id` int(10) unsigned NOT NULL, - `assigned_user_id` int(10) unsigned DEFAULT NULL, - `company_id` int(10) unsigned NOT NULL, - `currency_id` int(10) unsigned DEFAULT NULL, - `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `address1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `address2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `country_id` int(10) unsigned DEFAULT NULL, - `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `is_deleted` tinyint(4) NOT NULL DEFAULT 0, - `vat_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `transaction_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `vendor_hash` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `id_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `vendors_company_id_number_unique` (`company_id`,`number`), - KEY `vendors_company_id_deleted_at_index` (`company_id`,`deleted_at`), - KEY `vendors_user_id_foreign` (`user_id`), - KEY `vendors_country_id_foreign` (`country_id`), - KEY `vendors_currency_id_foreign` (`currency_id`), - CONSTRAINT `vendors_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `vendors_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`), - CONSTRAINT `vendors_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`), - CONSTRAINT `vendors_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `webhooks`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `webhooks` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `company_id` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, - `event_id` int(10) unsigned DEFAULT NULL, - `is_deleted` tinyint(1) NOT NULL DEFAULT 0, - `target_url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, - `format` enum('JSON','UBL') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'JSON', - `created_at` timestamp(6) NULL DEFAULT NULL, - `updated_at` timestamp(6) NULL DEFAULT NULL, - `deleted_at` timestamp(6) NULL DEFAULT NULL, - `rest_method` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `headers` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `subscriptions_company_id_foreign` (`company_id`), - KEY `subscriptions_event_id_company_id_index` (`event_id`,`company_id`), - CONSTRAINT `subscriptions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - -INSERT INTO `migrations` VALUES (1,'2014_10_12_100000_create_password_resets_table',1); -INSERT INTO `migrations` VALUES (2,'2014_10_13_000000_create_users_table',1); -INSERT INTO `migrations` VALUES (3,'2019_11_10_115926_create_failed_jobs_table',1); -INSERT INTO `migrations` VALUES (4,'2020_03_05_123315_create_jobs_table',1); -INSERT INTO `migrations` VALUES (5,'2020_04_08_234530_add_is_deleted_column_to_company_tokens_table',1); -INSERT INTO `migrations` VALUES (6,'2020_05_13_035355_add_google_refresh_token_to_users_table',1); -INSERT INTO `migrations` VALUES (7,'2020_07_05_084934_company_too_large_attribute',1); -INSERT INTO `migrations` VALUES (8,'2020_07_08_065301_add_token_id_to_activity_table',1); -INSERT INTO `migrations` VALUES (9,'2020_07_21_112424_update_enabled_modules_value',1); -INSERT INTO `migrations` VALUES (10,'2020_07_28_104218_shop_token',1); -INSERT INTO `migrations` VALUES (11,'2020_08_04_080851_add_is_deleted_to_group_settings',1); -INSERT INTO `migrations` VALUES (12,'2020_08_11_221627_add_is_deleted_flag_to_client_gateway_token_table',1); -INSERT INTO `migrations` VALUES (13,'2020_08_13_095946_remove_photo_design',1); -INSERT INTO `migrations` VALUES (14,'2020_08_13_212702_add_reminder_sent_fields_to_entity_tables',1); -INSERT INTO `migrations` VALUES (15,'2020_08_18_140557_add_is_public_to_documents_table',1); -INSERT INTO `migrations` VALUES (16,'2020_09_22_205113_id_number_fields_for_missing_entities',1); -INSERT INTO `migrations` VALUES (17,'2020_09_27_215800_update_gateway_table_visible_column',1); -INSERT INTO `migrations` VALUES (18,'2020_10_11_211122_vendor_schema_update',1); -INSERT INTO `migrations` VALUES (19,'2020_10_12_204517_project_number_column',1); -INSERT INTO `migrations` VALUES (20,'2020_10_14_201320_project_ids_to_entities',1); -INSERT INTO `migrations` VALUES (21,'2020_10_19_101823_project_name_unique_removal',1); -INSERT INTO `migrations` VALUES (22,'2020_10_21_222738_expenses_nullable_assigned_user',1); -INSERT INTO `migrations` VALUES (23,'2020_10_22_204900_company_table_fields',1); -INSERT INTO `migrations` VALUES (24,'2020_10_27_021751_tasks_invoice_documents',1); -INSERT INTO `migrations` VALUES (25,'2020_10_28_224711_status_sort_order',1); -INSERT INTO `migrations` VALUES (26,'2020_10_28_225022_assigned_user_tasks_table',1); -INSERT INTO `migrations` VALUES (27,'2020_10_29_001541_vendors_phone_column',1); -INSERT INTO `migrations` VALUES (28,'2020_10_29_093836_change_start_time_column_type',1); -INSERT INTO `migrations` VALUES (29,'2020_10_29_204434_tasks_table_project_nullable',1); -INSERT INTO `migrations` VALUES (30,'2020_10_29_210402_change_default_show_tasks_table',1); -INSERT INTO `migrations` VALUES (31,'2020_10_30_084139_change_expense_currency_id_column',1); -INSERT INTO `migrations` VALUES (32,'2020_11_01_031750_drop_migrating_column',1); -INSERT INTO `migrations` VALUES (33,'2020_11_03_200345_company_gateway_fields_refactor',1); -INSERT INTO `migrations` VALUES (34,'2020_11_08_212050_custom_fields_for_payments_table',1); -INSERT INTO `migrations` VALUES (35,'2020_11_12_104413_company_gateway_rename_column',1); -INSERT INTO `migrations` VALUES (36,'2020_11_15_203755_soft_delete_paymentables',1); -INSERT INTO `migrations` VALUES (37,'2020_12_14_114722_task_fields',1); -INSERT INTO `migrations` VALUES (38,'2020_12_17_104033_add_enable_product_discount_field_to_companies_table',1); -INSERT INTO `migrations` VALUES (39,'2020_12_20_005609_change_products_table_cost_resolution',1); -INSERT INTO `migrations` VALUES (40,'2020_12_23_220648_remove_null_values_in_countries_table',1); -INSERT INTO `migrations` VALUES (41,'2021_01_03_215053_update_canadian_dollar_symbol',1); -INSERT INTO `migrations` VALUES (42,'2021_01_05_013203_improve_decimal_resolution',1); -INSERT INTO `migrations` VALUES (43,'2021_01_07_023350_update_singapore_dollar_symbol',1); -INSERT INTO `migrations` VALUES (44,'2021_01_08_093324_expenses_table_additional_fields',1); -INSERT INTO `migrations` VALUES (45,'2021_01_11_092056_fix_company_settings_url',1); -INSERT INTO `migrations` VALUES (46,'2021_01_17_040331_change_custom_surcharge_column_type',1); -INSERT INTO `migrations` VALUES (47,'2021_01_23_044502_scheduler_is_running_check',1); -INSERT INTO `migrations` VALUES (48,'2021_01_24_052645_add_paid_to_date_column',1); -INSERT INTO `migrations` VALUES (49,'2021_01_25_095351_add_number_field_to_clients_and_vendors',1); -INSERT INTO `migrations` VALUES (50,'2021_01_29_121502_add_permission_changed_timestamp',1); -INSERT INTO `migrations` VALUES (51,'2021_02_15_214724_additional_company_properties',1); -INSERT INTO `migrations` VALUES (52,'2021_02_19_212722_email_last_confirmed_email_address_users_table',1); -INSERT INTO `migrations` VALUES (53,'2021_02_25_205901_enum_invitations_email_status',1); -INSERT INTO `migrations` VALUES (54,'2021_02_27_091713_add_invoice_task_datelog_property',1); -INSERT INTO `migrations` VALUES (55,'2021_03_03_230941_add_has_password_field_to_user_table',1); -INSERT INTO `migrations` VALUES (56,'2021_03_08_123729_create_billing_subscriptions_table',1); -INSERT INTO `migrations` VALUES (57,'2021_03_08_205030_add_russian_lang',1); -INSERT INTO `migrations` VALUES (58,'2021_03_09_132242_add_currency_id_to_billing_subscriptions_table',1); -INSERT INTO `migrations` VALUES (59,'2021_03_18_113704_change_2fa_column_from_varchar_to_text',1); -INSERT INTO `migrations` VALUES (60,'2021_03_19_221024_add_unique_constraints_on_all_entities',1); -INSERT INTO `migrations` VALUES (61,'2021_03_20_033751_add_invoice_id_to_client_subscriptions_table',1); -INSERT INTO `migrations` VALUES (62,'2021_03_23_233844_add_nullable_constraint_to_recurring_invoice_id',1); -INSERT INTO `migrations` VALUES (63,'2021_03_25_082025_refactor_billing_scriptions_table',1); -INSERT INTO `migrations` VALUES (64,'2021_03_26_201148_add_price_column_to_subscriptions_table',1); -INSERT INTO `migrations` VALUES (65,'2021_04_01_093128_modify_column_on_subscriptions_table',1); -INSERT INTO `migrations` VALUES (66,'2021_04_05_115345_add_trial_duration_to_accounts_table',1); -INSERT INTO `migrations` VALUES (67,'2021_04_05_213802_add_rest_fields_to_webhooks_table',1); -INSERT INTO `migrations` VALUES (68,'2021_04_06_131028_create_licenses_table',1); -INSERT INTO `migrations` VALUES (69,'2021_04_12_095424_stripe_connect_gateway',1); -INSERT INTO `migrations` VALUES (70,'2021_04_13_013424_add_subscription_id_to_activities_table',1); -INSERT INTO `migrations` VALUES (71,'2021_04_22_110240_add_property_to_checkout_gateway_config',1); -INSERT INTO `migrations` VALUES (72,'2021_04_29_085418_add_number_years_active_to_company_users_table',1); -INSERT INTO `migrations` VALUES (73,'2021_05_03_152940_make_braintree_provider_visible',1); -INSERT INTO `migrations` VALUES (74,'2021_05_04_231430_add_task_property_to_companies_table',1); -INSERT INTO `migrations` VALUES (75,'2021_05_05_014713_activate_we_pay',1); -INSERT INTO `migrations` VALUES (76,'2021_05_10_041528_add_recurring_invoice_id_to_activities_table',1); -INSERT INTO `migrations` VALUES (77,'2021_05_27_105157_add_tech_design',1); -INSERT INTO `migrations` VALUES (78,'2021_05_30_100933_make_documents_assigned_user_nullable',1); -INSERT INTO `migrations` VALUES (79,'2021_06_10_221012_add_ninja_portal_column_to_accounts_table',1); -INSERT INTO `migrations` VALUES (80,'2021_06_24_095942_payments_table_currency_nullable',1); -INSERT INTO `migrations` VALUES (81,'2021_07_10_085821_activate_payfast_payment_driver',1); -INSERT INTO `migrations` VALUES (82,'2021_07_19_074503_set_invoice_task_datelog_true_in_companies_table',1); -INSERT INTO `migrations` VALUES (83,'2021_07_20_095537_activate_paytrace_payment_driver',1); -INSERT INTO `migrations` VALUES (84,'2021_07_21_213344_change_english_languages_tables',1); -INSERT INTO `migrations` VALUES (85,'2021_07_21_234227_activate_eway_payment_driver',1); -INSERT INTO `migrations` VALUES (86,'2021_08_03_115024_activate_mollie_payment_driver',1); -INSERT INTO `migrations` VALUES (87,'2021_08_05_235942_add_zelle_payment_type',1); -INSERT INTO `migrations` VALUES (88,'2021_08_07_222435_add_markdown_enabled_column_to_companies_table',1); -INSERT INTO `migrations` VALUES (89,'2021_08_10_034407_add_more_languages',1); -INSERT INTO `migrations` VALUES (90,'2021_08_14_054458_square_payment_driver',1); -INSERT INTO `migrations` VALUES (91,'2021_08_18_220124_use_comma_as_decimal_place_companies_table',1); -INSERT INTO `migrations` VALUES (92,'2021_08_23_101529_recurring_expenses_schema',1); -INSERT INTO `migrations` VALUES (93,'2021_08_25_093105_report_include_drafts_in_companies_table',1); -INSERT INTO `migrations` VALUES (94,'2021_09_05_101209_update_braintree_gateway',1); -INSERT INTO `migrations` VALUES (95,'2021_09_20_233053_set_square_test_mode_boolean',1); -INSERT INTO `migrations` VALUES (96,'2021_09_23_100629_add_currencies',1); -INSERT INTO `migrations` VALUES (97,'2021_09_24_201319_add_mollie_bank_transfer_to_payment_types',1); -INSERT INTO `migrations` VALUES (98,'2021_09_24_211504_add_kbc_to_payment_types',1); -INSERT INTO `migrations` VALUES (99,'2021_09_24_213858_add_bancontact_to_payment_types',1); -INSERT INTO `migrations` VALUES (100,'2021_09_28_154647_activate_gocardless_payment_driver',1); -INSERT INTO `migrations` VALUES (101,'2021_09_29_190258_add_required_client_registration_fields',1); -INSERT INTO `migrations` VALUES (102,'2021_10_04_134908_add_ideal_to_payment_types',1); -INSERT INTO `migrations` VALUES (103,'2021_10_06_044800_updated_bold_and_modern_designs',1); -INSERT INTO `migrations` VALUES (104,'2021_10_07_141737_razorpay',1); -INSERT INTO `migrations` VALUES (105,'2021_10_07_155410_add_hosted_page_to_payment_types',1); -INSERT INTO `migrations` VALUES (106,'2021_10_15_00000_stripe_payment_gateways',1); -INSERT INTO `migrations` VALUES (107,'2021_10_16_135200_add_direct_debit_to_payment_types',1); -INSERT INTO `migrations` VALUES (108,'2021_10_19_142200_add_gateway_type_for_direct_debit',1); -INSERT INTO `migrations` VALUES (109,'2021_10_20_005529_add_filename_to_backups_table',1); -INSERT INTO `migrations` VALUES (110,'2021_11_08_131308_onboarding',1); -INSERT INTO `migrations` VALUES (111,'2021_11_09_115919_update_designs',1); -INSERT INTO `migrations` VALUES (112,'2021_11_10_184847_add_is_migrate_column_to_accounts_table',1); -INSERT INTO `migrations` VALUES (113,'2021_11_11_163121_add_instant_bank_transfer',1); -INSERT INTO `migrations` VALUES (114,'2021_12_20_095542_add_serbian_language_translations',1); -INSERT INTO `migrations` VALUES (115,'2022_01_02_022421_add_slovak_language',1); -INSERT INTO `migrations` VALUES (116,'2022_01_06_061231_add_app_domain_id_to_gateways_table',1); -INSERT INTO `migrations` VALUES (117,'2022_01_18_004856_add_estonian_language',1); -INSERT INTO `migrations` VALUES (118,'2022_01_19_085907_add_platform_column_to_accounts_table',1); -INSERT INTO `migrations` VALUES (119,'2022_01_19_232436_add_kyd_currency',1); -INSERT INTO `migrations` VALUES (120,'2022_01_27_223617_add_client_count_to_accounts_table',1); -INSERT INTO `migrations` VALUES (121,'2022_02_06_091629_add_client_currency_conversion_to_companies_table',1); -INSERT INTO `migrations` VALUES (122,'2022_02_25_015411_update_stripe_apple_domain_config',1); -INSERT INTO `migrations` VALUES (123,'2022_03_09_053508_transaction_events',1); -INSERT INTO `migrations` VALUES (124,'2022_03_24_090728_markdown_email_enabled_wysiwyg_editor',1); -INSERT INTO `migrations` VALUES (125,'2022_03_29_014025_reverse_apple_domain_for_hosted',1); -INSERT INTO `migrations` VALUES (126,'2022_04_14_121548_forte_payment_gateway',1); -INSERT INTO `migrations` VALUES (127,'2022_04_22_115838_client_settings_parse_for_types',1); -INSERT INTO `migrations` VALUES (128,'2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text',1); -INSERT INTO `migrations` VALUES (129,'2022_05_08_004937_heal_stripe_gateway_configuration',1); -INSERT INTO `migrations` VALUES (130,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1); -INSERT INTO `migrations` VALUES (131,'2022_05_18_055442_update_custom_value_four_columns',1); -INSERT INTO `migrations` VALUES (132,'2022_05_18_162152_create_scheduled_jobs_table',1); -INSERT INTO `migrations` VALUES (133,'2022_05_18_162443_create_schedulers_table',1); -INSERT INTO `migrations` VALUES (134,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1); -INSERT INTO `migrations` VALUES (135,'2022_05_28_234651_create_purchase_orders_table',1); -INSERT INTO `migrations` VALUES (136,'2022_05_30_181109_drop_scheduled_jobs_table',1); -INSERT INTO `migrations` VALUES (137,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',1); -INSERT INTO `migrations` VALUES (138,'2022_05_31_101504_inventory_management_schema',1); -INSERT INTO `migrations` VALUES (139,'2022_06_01_215859_set_recurring_client_timestamp',1); -INSERT INTO `migrations` VALUES (140,'2022_06_01_224339_create_purchase_order_invitations_table',1); -INSERT INTO `migrations` VALUES (141,'2022_06_10_030503_set_account_flag_for_react',1); -INSERT INTO `migrations` VALUES (142,'2022_06_16_025156_add_react_switching_flag',1); -INSERT INTO `migrations` VALUES (143,'2022_06_17_082627_change_refresh_token_column_size',1); -INSERT INTO `migrations` VALUES (144,'2022_06_21_104350_fixes_for_description_in_pdf_designs',1); -INSERT INTO `migrations` VALUES (145,'2022_06_22_090547_set_oauth_expiry_column',1); -INSERT INTO `migrations` VALUES (146,'2022_06_24_141018_upgrade_failed_jobs_table',1); -INSERT INTO `migrations` VALUES (147,'2022_06_30_000126_add_flag_to_accounts_table',1); -INSERT INTO `migrations` VALUES (148,'2022_07_06_080127_add_purchase_order_to_expense',1); -INSERT INTO `migrations` VALUES (149,'2022_07_09_235510_add_index_to_payment_hash',1); -INSERT INTO `migrations` VALUES (150,'2022_07_18_033756_fixes_for_date_formats_table_react',1); -INSERT INTO `migrations` VALUES (151,'2022_07_21_023805_add_hebrew_language',1); -INSERT INTO `migrations` VALUES (152,'2022_07_26_091216_add_sms_verification_to_hosted_account',1); -INSERT INTO `migrations` VALUES (153,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',1); -INSERT INTO `migrations` VALUES (154,'2022_07_29_091235_correction_for_companies_table_types',1); -INSERT INTO `migrations` VALUES (155,'2022_08_05_023357_bank_integration',1); -INSERT INTO `migrations` VALUES (156,'2022_08_11_011534_licenses_table_for_self_host',1); -INSERT INTO `migrations` VALUES (157,'2022_08_24_215917_invoice_task_project_companies_table',1); -INSERT INTO `migrations` VALUES (158,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',1); -INSERT INTO `migrations` VALUES (159,'2022_08_28_210111_add_index_to_payments_table',1); -INSERT INTO `migrations` VALUES (160,'2022_09_05_024719_update_designs_for_tech_template',1); -INSERT INTO `migrations` VALUES (161,'2022_09_07_101731_add_reporting_option_to_companies_table',1); -INSERT INTO `migrations` VALUES (162,'2022_09_21_012417_add_threeds_to_braintree',1); -INSERT INTO `migrations` VALUES (163,'2022_09_30_235337_add_idempotency_key_to_payments',1); -INSERT INTO `migrations` VALUES (164,'2022_10_05_205645_add_indexes_to_client_hash',1); -INSERT INTO `migrations` VALUES (165,'2022_10_06_011344_add_key_to_products',1); -INSERT INTO `migrations` VALUES (166,'2022_10_07_065455_add_key_to_company_tokens_table',1); -INSERT INTO `migrations` VALUES (167,'2022_10_10_070137_add_documentable_index',1); -INSERT INTO `migrations` VALUES (168,'2022_10_27_044909_add_user_sms_verification_code',1); -INSERT INTO `migrations` VALUES (169,'2022_11_02_063742_add_verified_number_flag_to_users_table',1); -INSERT INTO `migrations` VALUES (170,'2022_11_04_013539_disabled_upstream_bank_integrations_table',1); -INSERT INTO `migrations` VALUES (171,'2022_11_06_215526_drop_html_backups_column_from_backups_table',1); -INSERT INTO `migrations` VALUES (172,'2022_11_16_093535_calmness_design',1); -INSERT INTO `migrations` VALUES (173,'2022_11_22_215618_lock_tasks_when_invoiced',1); -INSERT INTO `migrations` VALUES (174,'2022_11_13_034143_bank_transaction_rules_table',2); diff --git a/resources/views/pdf-designs/bold.html b/resources/views/pdf-designs/bold.html index 5b322484286e..b7380befd586 100644 --- a/resources/views/pdf-designs/bold.html +++ b/resources/views/pdf-designs/bold.html @@ -321,6 +321,17 @@ position: fixed; } + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/business.html b/resources/views/pdf-designs/business.html index d4c0da6f2c44..5094629b83b7 100644 --- a/resources/views/pdf-designs/business.html +++ b/resources/views/pdf-designs/business.html @@ -306,6 +306,16 @@ position: fixed; } + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/calm.html b/resources/views/pdf-designs/calm.html index bbd8887835ca..ad9fc8239b2d 100644 --- a/resources/views/pdf-designs/calm.html +++ b/resources/views/pdf-designs/calm.html @@ -293,6 +293,18 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } + /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index dac7dcfe60b7..51101e918901 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -286,6 +286,17 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ diff --git a/resources/views/pdf-designs/creative.html b/resources/views/pdf-designs/creative.html index 1f7f6dbe8050..5c7fbbcec08a 100644 --- a/resources/views/pdf-designs/creative.html +++ b/resources/views/pdf-designs/creative.html @@ -258,6 +258,17 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/elegant.html b/resources/views/pdf-designs/elegant.html index 649160995e15..765a0b467c1c 100644 --- a/resources/views/pdf-designs/elegant.html +++ b/resources/views/pdf-designs/elegant.html @@ -262,6 +262,17 @@ opacity: 0.2; z-index:200 !important; position: fixed; + } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; } /** Useful snippets, uncomment to enable. **/ diff --git a/resources/views/pdf-designs/hipster.html b/resources/views/pdf-designs/hipster.html index d3201b1bc92c..0fa18db9bda1 100644 --- a/resources/views/pdf-designs/hipster.html +++ b/resources/views/pdf-designs/hipster.html @@ -280,6 +280,17 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/modern.html b/resources/views/pdf-designs/modern.html index e47ebffd3db4..ec3962214a3c 100644 --- a/resources/views/pdf-designs/modern.html +++ b/resources/views/pdf-designs/modern.html @@ -307,6 +307,17 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/ diff --git a/resources/views/pdf-designs/plain.html b/resources/views/pdf-designs/plain.html index 5075e7f3f646..aa38661960f8 100644 --- a/resources/views/pdf-designs/plain.html +++ b/resources/views/pdf-designs/plain.html @@ -252,9 +252,10 @@ } .project-header { - font-size: 1.5em; + font-size: 1.2em; margin-top: 0.1em; - margin-bottom: 0.1em; + margin-bottom: 0; + padding-bottom: 0; margin-left: 0; margin-right: 0; font-weight: bold; diff --git a/resources/views/pdf-designs/playful.html b/resources/views/pdf-designs/playful.html index 84ac8eb6f294..6b4b1f7aa42f 100644 --- a/resources/views/pdf-designs/playful.html +++ b/resources/views/pdf-designs/playful.html @@ -323,6 +323,17 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ diff --git a/resources/views/pdf-designs/tech.html b/resources/views/pdf-designs/tech.html index e9ff50fe6242..fc322ea7e7f1 100644 --- a/resources/views/pdf-designs/tech.html +++ b/resources/views/pdf-designs/tech.html @@ -287,6 +287,17 @@ z-index:200 !important; position: fixed; } + + .project-header { + font-size: 1.2em; + margin-top: 0.1em; + margin-bottom: 0; + padding-bottom: 0; + margin-left: 0; + margin-right: 0; + font-weight: bold; + color: #505050; + } /** Useful snippets, uncomment to enable. **/ /** Hide company logo **/