tomatophp/filament-invoices

Doesn't support PostgreSql

Opened this issue · 7 comments

When I try install this package, composer install all tomatophp extension too. Then, try to exec filament-invoices:install command, and errored about sqlstate. You prepared as sql file not migration.

The Error:

$ php artisan filament-invoices:install
Publish Vendor Assets

   Illuminate\Database\QueryException 

  SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "types" does not exist
LINE 1: select * from "types" where "for" = $1 and "type" = $2 and "...
                      ^ (Connection: pgsql, SQL: select * from "types" where "for" = invoices and "type" = status and "key" = draft limit 1)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:825
    821▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e
    822▕                 );
    823▕             }
    824▕
  ➜ 825▕             throw new QueryException(
    826▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
    827▕             );
    828▕         }
    829▕     }

      +40 vendor frames 

  41  artisan:13
      Illuminate\Foundation\Application::handleCommand()

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Hi @icsarisakal, could you provide more details about this error? I believe it should be working fine. We haven't tested it on Postgres, but it only uses ORM, so it should work.

Of course, I try to install invoices via your instructions. I exec composer require tomatophp/filament-invoices then it's ok. After that, I try to exec php artisan filament-invoices:install then its errored about sql which I mentioned previous comment and additionally, it's errored as

php artisan migrate

  INFO  Running migrations.  

 2021_04_14_182305_fill_all_vars ...................................................................................................... 6.64ms FAIL

  PDOException 

 SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "`"
LINE 2: INSERT INTO `countries` (`id`, `name`, `code`, `phone`, `cre...

I think is about generated mysql sql in vendor/tomatophp/filament-invoices/database/migrations and vendor/tomatophp/filament-locations/database/data/countries.sql. This countries sql file is formatted as MySQL syntax. If you control db engine we can pass the error section. Thanks.

@icsarisakal yes i know about this problem it's because of Location plugin and I will fix it very soon, thanks for your report

@icsarisakal yes i know about this problem it's because of Location plugin and I will fix it very soon, thanks for your report

thanks a lot

@3x1io i can help if you want

yes please @icsarisakal it will be great