Download the PHP package paysera/lib-database-init-bundle without Composer
On this page you can find all versions of the php package paysera/lib-database-init-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paysera/lib-database-init-bundle
More information about paysera/lib-database-init-bundle
Files in paysera/lib-database-init-bundle
Package lib-database-init-bundle
Short Description Initializes database for your project
License
Informations about the package lib-database-init-bundle
lib-database-init-bundle
Initializes your database to needed state. Exports your database. Can be configured to export different parts of the database (stricture, specific grouped tables). Supports plain SQL queries and Doctrine Fixtures.
Installation
Install: composer requre --dev paysera/lib-database-init-bundle
Register:
Configuration
In your config_dev.yml
- change table names with corresponding tables in the project:
-
paysera_database_init.directories.sql
(optional) - Will look for*.sql
files in given directories, split each by lines, and execute each line. Multi-line SQL statements should be separated by;\n
characters. -
paysera_database_init.exports
(optional) - Define different DatabaseExport configurationsname
- will be used for the exported filenamepriority
- sets priority over the rest of the exports; it is also used as a prefix of the exported filenametables
- array of tables to be exporteddirectory
- exported file will be placed in this directory
-
paysera_database_init.directories.fixtures
(optional) - Will load all fixtures in given directories to database. Be aware that migrations should be executed before applying fixtures. -
paysera_database_init.directories.structure
(required) - Structure will be exported in stated directory invert_tables_from
(optional) - Will ignore specified export configuration's tables. When used without specifiedtables
it will export all tables in the db except{invert_tables_from}.tables
Run
bin/console paysera:db-init:init {initializer} {set}
initializer
- optional name of single initializer to run.- List of provided initializers:
sql
fixtures
set
- optional name of given configuration, i.e.initial
oradditional
in configuration example above.
bin/console paysera:db-init:export {export_key}
export_key
- optional name of single exporter to run.
Extension
Implement \Paysera\Bundle\DatabaseInitBundle\Service\Initializer\DatabaseInitializerInterface
and tag your service with paysera_database_init.initializer
, provide priority
tag attribute.
Run PHPUnit tests
Starting or switching the dev environment:
Entering php container:
Install composer packages:
Running tests:
Stopping the dev environment:
All versions of lib-database-init-bundle with dependencies
paysera/lib-dependency-injection Version ^1.0
doctrine/dbal Version ^2.5
doctrine/data-fixtures Version ^1.0
doctrine/annotations Version ^1.14
symfony/finder Version ^5.0
symfony/console Version ^5.0
symfony/http-kernel Version ^5.0
symfony/doctrine-bridge Version ^5.0