Skip to content

Commit 4ed7ab6

Browse files
authored
Merge pull request #12 from okvpn/dump-without-entities
Wrong dump for bundle without entities
2 parents 6756213 + 59bcd68 commit 4ed7ab6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Resources/views/schema-template.php.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ class {{ className }} implements Installation
2727
public function up(Schema $schema, QueryBag $queries)
2828
{
2929
/** Tables generation **/
30-
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
30+
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined %}
3131
$this->{{ 'create' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'Table' }}($schema);
3232
{% endfor %}
3333
3434
/** Foreign keys generation **/
35-
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
35+
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined %}
3636
{% if table.ForeignKeys is not empty %}
3737
$this->{{ 'add' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'ForeignKeys' }}($schema);
3838
{% endif %}
3939
{% endfor %}
4040
}
41-
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
41+
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined %}
4242
{% set methodName = 'create' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'Table' %}
4343
4444
/**
@@ -64,7 +64,7 @@ class {{ className }} implements Installation
6464
{% endfor %}
6565
}
6666
{% endfor %}
67-
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined -%}
67+
{% for table in schema.tables if allowedTables is not empty and allowedTables[table.name] is defined -%}
6868
{% set methodName = 'add' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'ForeignKeys' %}
6969
{% if table.ForeignKeys is not empty %}
7070

0 commit comments

Comments
 (0)