reliese / laravel

Reliese Laravel Model Generator
MIT License
1.49k stars 316 forks source link

Solves problem with postgresql databases in Laravel 11 #294

Closed C-ArenA closed 2 months ago

C-ArenA commented 2 months ago

This PR fixes the schemas() method to stop using Doctrine. It treats "schemas" as "databases" instead of "PostgreSQL Schemas" as stated in a comment in the same file. It's not a big change, but it now works perfectly with PostgreSQL connections and partially addresses issues #286 and #292.

Benjaminhu commented 2 months ago

@C-ArenA @finiteinfinity I am currently actively using PostgreSQL. While investigating a bug the other day, I ran into an undocumented Laravel function: search_path: https://github.com/laravel/ideas/issues/918 This feature was added in Laravel 9, so if you use more than one scheme, you must list them here. Care must be taken that the schema containing the migrations table is the first (usually public).

I think it would be worthwhile to adapt the operation to this, i.e. if data is provided there, it is used. What do you think?