0

I'm migrating from MySQL to PostgreSQL and I would like to use some advanced database layer in PHP. RedbeanPHP looks really nice to me, but I can't find how to use different postgres schemas. I've only found some old post and there is written that there is no support for schemas yet, but it was 2 years ago.

If there is really no support for schemas in redbean yet, wich layer do you recommend? Doctrine, propel or something else?

Peter Krejci
  • 3,182
  • 6
  • 31
  • 49

2 Answers2

2

Depending on what you have to do and how much you want to rely on Postgresql's features, I could suggest you had a look at Pomm. It works for PHP >= 5.3 and Pg >= 8.4

In any case, whatever you use an ORM or not, you will have to rewrite your queries either to adapt them to the ORM or to Postgresql.

Hope it helps.

greg
  • 3,354
  • 1
  • 24
  • 35
0

You can change the search path when you need: R::exec("SET search_path TO schema-name, public"); Or simply: R::exec("SET search_path TO schema-name");

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 27 '22 at 21:57