show_create.twig 957 B

12345678910111213141516171819202122232425262728293031
  1. <div class="show_create_results">
  2. <h2>{% trans 'Showing create queries' %}</h2>
  3. {% set views = [] %}
  4. {% set tables = [] %}
  5. {% for object in db_objects %}
  6. {% if dbi.getTable(db, object).isView() %}
  7. {% set views = views|merge([object]) %}
  8. {% else %}
  9. {% set tables = tables|merge([object]) %}
  10. {% endif %}
  11. {% endfor %}
  12. {% if tables is not empty %}
  13. {% include 'database/structure/show_create_row.twig' with {
  14. 'db': db,
  15. 'title': 'Tables'|trans,
  16. 'raw_title': 'Table',
  17. 'db_objects': tables,
  18. 'dbi': dbi
  19. } only %}
  20. {% endif %}
  21. {% if views is not empty %}
  22. {% include 'database/structure/show_create_row.twig' with {
  23. 'db': db,
  24. 'title': 'Views'|trans,
  25. 'raw_title': 'View',
  26. 'db_objects': views,
  27. 'dbi': dbi
  28. } only %}
  29. {% endif %}
  30. </div>