0
votes

Hi I just started working on a project which is build with PHP Symfony using Propel-Mysql. I'm migrating the database from MySql to Postgres, and would like to know how I can do that.

The current schema is stored in a schema.yml file

Since I'm new to Symfony, I'd like to know a few things:

  • Is there support for Postgres with Symfony/Propel
  • As far as I know, the schema will have to be changed a little bit, the constructs of MySql and Postgres are not similar, how can I go about doing so?
  • will my ORM auto-generate usage class files once the migration is complete?
1

1 Answers

0
votes
  1. I've generated a Postgres database in Propel before after installing the PHP Postgres connector.
  2. I would suggest branching your Propel codebase (or just the om and map folders) and doing a fresh generation since Propel will never modify or delete table extension classes once they're generated. All you can do after that point is unit testing your code. There's no way to know if there are issues otherwise.
  3. If you mean the om and map directories, then yes. If you've renamed any of your tables, then somewhat. If you have custom code in your table extension classes, then you'll have to move those to the newly generated classes.