diff --git a/automation/send-invoice.php b/automation/send-invoice.php index c1c72ae..8f0d329 100644 --- a/automation/send-invoice.php +++ b/automation/send-invoice.php @@ -113,7 +113,7 @@ try { $response = curl_exec($curl); if ($response === false) { - $log->error('Curl error: ' . curl_error($curl) . curl_errno($curl)); + throw new Exception(curl_error($curl), curl_errno($curl)); } curl_close($curl); @@ -123,4 +123,6 @@ try { } } catch (PDOException $e) { $log->error('Database error: ' . $e->getMessage()); +} catch (Throwable $e) { + $log->error('Error: ' . $e->getMessage()); } \ No newline at end of file diff --git a/database/registry.mariadb.sql b/database/registry.mariadb.sql index ab4f5f8..73f77a3 100644 --- a/database/registry.mariadb.sql +++ b/database/registry.mariadb.sql @@ -175,7 +175,6 @@ CREATE TABLE IF NOT EXISTS `registry`.`statement` ( CREATE TABLE IF NOT EXISTS `registry`.`invoices` ( `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, - `invoice_number` VARCHAR(20), `registrar_id` INT(10) UNSIGNED, `billing_contact_id` INT(10) UNSIGNED, `issue_date` DATETIME(3), diff --git a/database/registry.postgres.sql b/database/registry.postgres.sql index 4f6f198..1f4801f 100644 --- a/database/registry.postgres.sql +++ b/database/registry.postgres.sql @@ -180,7 +180,6 @@ CREATE TABLE registry.statement ( CREATE TABLE registry.invoices ( "id" SERIAL PRIMARY KEY, - "invoice_number" VARCHAR(20), "registrar_id" INT, "billing_contact_id" INT, "issue_date" TIMESTAMP(3),