hydrax-skarrag / mwbs-exporter-symfony-bundle
Symfony2 Bundle for the "MySQL Workbench Schema Exporter for Doctrine2 Annotations"
Installs: 73
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:cli
pkg:composer/hydrax-skarrag/mwbs-exporter-symfony-bundle
Requires
- php: >=5.3.0
- hydrax-skarrag/mwbs-exporter: dev-master
- symfony/symfony: 2.*
This package is not auto-updated.
Last update: 2025-12-15 22:13:00 UTC
README
Symfony2 Bundle for the "MySQL Workbench Schema Exporter for Doctrine2 Annotations"
Setup
Workbench files are saved in the Resources/workbench/*.mwb directory inside your bundle.
Configuration
Single schema
schema_name here refers to name of the Workbench file
mwbs_exporter:
schema:
schema_name:
bundle: YourBundle
Multiple schemas
schema_name here refers to name of the Workbench file
mysql_workbench_schema_exporter:
schema:
schema1_name:
bundle: YourBundle
schema2_name:
bundle: YourBundle
schema3_name:
bundle: YourBundle
params:
bundleNamespace: "YourBundle"
repositoryNamespace: "YourBundle\\Entity"
entityNamespace: ""
useAnnotationPrefix: "ORM\\"
generateBaseClasses: true
useAutomaticRepository: true
skipPluralNameChecking: false
enhanceManyToManyDetection: true
filename: "%%entity%%.%%extension%%"
backupExistingFile: false
indentation: 4
quoteIdentifier: false
Execution
To process the files execute the command in the terminal:
app/console mwbs:export-entities
Exporter Options
Exporter options
-
bundleNamespaceName of your Bundlenamespace
-
repositoryNamespaceName of your repositoryNamespace
-
entityNamespaceName of your entityNamespace
-
useAnnotationPrefixDoctrine annotation prefix. Default is
ORM\. -
generateBaseClassesGenerate Entity Base Classes
-
useAutomaticRepositorySee above.
-
skipPluralNameCheckingSkip checking the plural name of model and leave as is, useful for non English table names. Default is
false. -
enhanceManyToManyDetectionIf enabled, many to many relations between tables will be added to generated code. Default is
true. -
filenameThe output filename format, use the following tag
%schema%,%table%,%entity%, and%extension%to allow the filename to be replaced with contextual data. Default is%entity%.%extension%. -
backupExistingFileIf target already exists create a backup before replacing the content. Default is
true. -
indentationThe indentation size for generated code.
-
quoteIdentifierIf this option is enabled, all table names and column names will be quoted using backtick (
`). Usefull when the table name or column name contains reserved word. Default isfalse.