Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.37 KB

SYMFONY.md

File metadata and controls

49 lines (38 loc) · 1.37 KB

Quickstart Symfony

The db-sync-tool can automatic detect the database credentials of a Symfony application.

Therefore, you have to define the file path to the database configuration file.

For Symfony >= 3.4 use the .env file containing the DATABASE_URL environment variable. See the Doctrine documentation for more information.

For Symfony <= 2.8 use the parameters.yml file containing the database parameters. See the Doctrine documentation for more information.

Command line

Example call for a Symfony sync in receiver mode:

$ python3 db_sync_tool 
    --type SYMFONY
    --origin-host <ORIGIN_HOST> 
    --origin-user <ORIGIN_USER>
    --origin-path <ORIGIN_PATH>
    --target-path <TARGET_PATH>

Configuration file

For reusability reasons you can use an additional configuration file containing all necessary information about the sync.

Command line call:

$ python3 db_sync_tool 
    --config-file <PATH TO CONFIG FILE>

Example configuration file:

{
  "type": "SYMFONY",
  "target": {
    "path": "<TARGET_PATH>"
  },
  "origin": {
    "host": "<ORIGIN_HOST>",
    "user": "<ORIGIN_USER>",
    "path": "<ORIGIN_PATH>"
  }
}

It is possible to extend the configuration.