Skip to content

Commit

Permalink
Merge pull request #12 from okvpn/dump-without-entities
Browse files Browse the repository at this point in the history
Wrong dump for bundle without entities
  • Loading branch information
vtsykun authored Jul 26, 2017
2 parents 6756213 + 59bcd68 commit 4ed7ab6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Resources/views/schema-template.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ class {{ className }} implements Installation
public function up(Schema $schema, QueryBag $queries)
{
/** Tables generation **/
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined %}
$this->{{ 'create' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'Table' }}($schema);
{% endfor %}
/** Foreign keys generation **/
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined %}
{% if table.ForeignKeys is not empty %}
$this->{{ 'add' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'ForeignKeys' }}($schema);
{% endif %}
{% endfor %}
}
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined %}
{% set methodName = 'create' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'Table' %}
/**
Expand All @@ -64,7 +64,7 @@ class {{ className }} implements Installation
{% endfor %}
}
{% endfor %}
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined -%}
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined -%}
{% set methodName = 'add' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'ForeignKeys' %}
{% if table.ForeignKeys is not empty %}
Expand Down

0 comments on commit 4ed7ab6

Please sign in to comment.