{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% if collector.data.unavailable_migrations_count is defined %} {% set unavailable_migrations = collector.data.unavailable_migrations_count %} {% set new_migrations = collector.data.new_migrations|length %} {% if unavailable_migrations > 0 or new_migrations > 0 %} {% set executed_migrations = collector.data.executed_migrations|length %} {% set available_migrations = collector.data.available_migrations_count %} {% set status_color = unavailable_migrations > 0 ? 'yellow' : '' %} {% set status_color = new_migrations > 0 ? 'red' : status_color %} {% set icon %} {% if profiler_markup_version < 3 %} {{ include('@DoctrineMigrations/Collector/icon.svg') }} {% else %} {{ include('@DoctrineMigrations/Collector/icon-v3.svg') }} {% endif %} {{ new_migrations + unavailable_migrations }} {% endset %} {% set text %}
Current Migration {{ executed_migrations > 0 ? collector.data.executed_migrations|last.version|split('\\')|last : 'n/a' }}
Database Migrations
Executed {{ executed_migrations }}
Unavailable {{ unavailable_migrations }}
Available {{ available_migrations }}
New {{ new_migrations }}
{% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} {% endif %} {% endif %} {% endblock %} {% block menu %} {% if collector.data.unavailable_migrations_count is defined %} {% set unavailable_migrations = collector.data.unavailable_migrations_count %} {% set new_migrations = collector.data.new_migrations|length %} {% set label = unavailable_migrations > 0 ? 'label-status-warning' : '' %} {% set label = new_migrations > 0 ? 'label-status-error' : label %} {% if profiler_markup_version < 3 %} {{ include('@DoctrineMigrations/Collector/icon.svg') }} {% else %} {{ include('@DoctrineMigrations/Collector/icon-v3.svg') }} {% endif %} Migrations {% if unavailable_migrations > 0 or new_migrations > 0 %} {{ new_migrations + unavailable_migrations }} {% endif %} {% endif %} {% endblock %} {% block panel %} {% set num_executed_migrations = collector.data.executed_migrations|length %} {% set num_unavailable_migrations = collector.data.unavailable_migrations_count %} {% set num_available_migrations = collector.data.available_migrations_count %} {% set num_new_migrations = collector.data.new_migrations|length %}

Doctrine Migrations

{{ num_executed_migrations }} Executed
{% if profiler_markup_version >= 3 %}
{% endif %}
{{ num_unavailable_migrations }} Unavailable
{{ num_available_migrations }} Available
{{ num_new_migrations }} New
{% if profiler_markup_version >= 3 %}
{# closes the
#} {% endif %}

Migrations {{ num_new_migrations > 0 ? num_new_migrations : num_unavailable_migrations > 0 ? num_unavailable_migrations : num_executed_migrations }}

{{ _self.render_migration_details(collector, profiler_markup_version) }}

Configuration

{{ _self.render_configuration_details(collector, profiler_markup_version) }}
{% endblock %} {% macro render_migration_details(collector) %} {% for migration in collector.data.new_migrations %} {{ _self.render_migration(migration) }} {% endfor %} {% for migration in collector.data.executed_migrations|reverse %} {{ _self.render_migration(migration) }} {% endfor %}
Version Description Status Executed at Execution time
{% endmacro %} {% macro render_configuration_details(collector) %} {% if collector.data.table is defined %} {% endif %} {% if collector.data.column is defined %} {% endif %}
Storage
Type {{ collector.data.storage }}
Table Name {{ collector.data.table }}
Column Name {{ collector.data.column }}
Database
Driver {{ collector.data.driver }}
Name {{ collector.data.name }}
{% for namespace, directory in collector.data.namespaces %} {% endfor %}
Migration Namespaces
{{ namespace }} {{ directory }}
{% endmacro %} {% macro render_migration(migration, profiler_markup_version) %} {% if migration.file %} {{ migration.version }} {% else %} {{ migration.version }} {% endif %} {{ migration.description }} {% if migration.is_new %} NOT EXECUTED {% elseif migration.is_unavailable %} UNAVAILABLE {% else %} EXECUTED {% endif %} {{ migration.executed_at ? migration.executed_at|date('M j, Y H:i') : 'n/a' }} {% if migration.execution_time is null %} n/a {% elseif migration.execution_time < 1 %} {{ (migration.execution_time * 1000)|number_format(0) }} ms {% else %} {{ migration.execution_time|number_format(2) }} seconds {% endif %} {% endmacro %}