library propel-schema-converter-bundle
creonit/propel-schema-converter-bundle
- Tuesday, April 24, 2018
- by creonit
- Repository
- 1 Watchers
- 0 Stars
- 570 Installations
- PHP
- 7 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 7 Versions
- 15 % Grown
PropelSchemaConverterBundle
Allows use YAML to describe schema, (*1)
Installation
1. Install the bundle with composer:
composer require creonit/propel-schema-converter-bundle
, (*2)
2. Registers the bundle in your app/AppKernel.php:
``` php
...
public function registerBundles()
{
$bundles = array(
...
new Creonit\PropelSchemaConverterBundle\CreonitPropelSchemaConverterBundle(),
...
);
..., (*3)
# Usage
Create a file `BundleDir/Resources/config/schema.yml` and run the command to build the model or migration. File schema.xml will be created automatically.
## Example `schema.yml`
``` yaml
config:
required: true
database:
+:
name: default
namespace: AppBundle\Model
package: src.AppBundle.Model
defaultIdMethod: native
+behavior:
- auto_add_pk
table:
+: {allowPkInsert: true}
id: {type: INTEGER, size: 10, primaryKey: true, autoIncrement: true}
column: varchar(64)
column2: int
column3: text key(8)
column4: tinyint uniq
column5: bool = 1
column6: - datetime
+unique:
- column(32)
+index: [column2]
+behavior:
- timestampable
- sortable: {use_scope: true, scope_column: column2}
table2:
id: int(10) ~pk
table_id: int
column: text = Default value
column2: int
+foreign-key:
- table: {local: table_id, foreign: id}
+behavior:
- timestampable
- sortable: column2
table3:
table_id: int pk > table.id
table2_id: int pk > table2.id(restrict cascade)
dev-master
9999999-dev
Sources
Download
GNU GPLv3
GPL-3.0-only
schema
bundle
symfony
yaml
yml
propel
creonit
v0.2.4
0.2.4.0
Sources
Download
GPL-3.0-only
schema
bundle
symfony
yaml
yml
propel
creonit
v0.2.3
0.2.3.0
Sources
Download
GNU GPLv3
schema
bundle
symfony
yaml
yml
propel
creonit
v0.2.2
0.2.2.0
Sources
Download
GNU GPLv3
schema
bundle
symfony
yaml
yml
propel
creonit
v0.2.1
0.2.1.0
Sources
Download
GNU GPLv3
schema
bundle
symfony
yaml
yml
propel
creonit
v0.2.0
0.2.0.0
Sources
Download
GNU GPLv3
schema
bundle
symfony
yaml
yml
propel
creonit
v0.1.0
0.1.0.0
Sources
Download
GNU GPLv3
schema
bundle
symfony
yaml
yml
propel
creonit