{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% import _self as helper %}
{% 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 %}
{{ include('@DoctrineMigrations/Collector/icon.svg') }}
{{ new_migrations + unavailable_migrations }}
{% endset %}
{% set text %}
Current
{{ executed_migrations > 0 ? collector.data.executed_migrations|last.version|split('\\')|last : 'n/a' }}
Executed
{{ executed_migrations }}
Executed 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 %}
{{ include('@DoctrineMigrations/Collector/icon.svg') }}
Migrations
{% if unavailable_migrations > 0 or new_migrations > 0 %}
{{ new_migrations + unavailable_migrations }}
{% endif %}
{% endif %}
{% endblock %}
{% block panel %}
Doctrine Migrations
{{ collector.data.executed_migrations|length }}
Executed
{{ collector.data.unavailable_migrations_count }}
Executed Unavailable
{{ collector.data.available_migrations_count }}
Available
{{ collector.data.new_migrations|length }}
New
Configuration
Storage |
Type |
{{ collector.data.storage }} |
{% if collector.data.table is defined %}
Table Name |
{{ collector.data.table }} |
{% endif %}
{% if collector.data.column is defined %}
Column Name |
{{ collector.data.column }} |
{% endif %}
Database |
Driver |
{{ collector.data.driver }} |
Name |
{{ collector.data.name }} |
Migration Namespaces |
{% for namespace, directory in collector.data.namespaces %}
{{ namespace }} |
{{ directory }} |
{% endfor %}
Migrations
Version |
Description |
Status |
Executed at |
Execution time |
{% for migration in collector.data.new_migrations %}
{{ helper.render_migration(migration) }}
{% endfor %}
{% for migration in collector.data.executed_migrations|reverse %}
{{ helper.render_migration(migration) }}
{% endfor %}
{% endblock %}
{% macro render_migration(migration) %}
{% 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 : 'n/a' }} |
{{ migration.execution_time|default('n/a') }} |
{% endmacro %}