- Fixed an HTML bug within database
- Added a new Migration attribute
This commit is contained in:
1 parent
58c61a8f01
commit
a9d7fd7f4c
2 files changed
+38
-27
No files matched your search
@@ -12,21 +12,25 @@
|
||||
|
||||
{% section "content" %}
|
||||
{% if $connections %}
|
||||
{% foreach $connections as $connection %}
|
||||
{% php $conf = $connection->getConfiguration(); %}
|
||||
{% ui:form.post "database.migrate", current_url() %}
|
||||
{% foreach $connections as $connection %}
|
||||
{% php $conf = $connection->getConfiguration(); %}
|
||||
|
||||
<section class="connection">
|
||||
<header>
|
||||
<div class="icon-database icon-purple">
|
||||
{% include "lean-console/svg/icon-database.svg" %}
|
||||
</div>
|
||||
<section class="connection">
|
||||
<header>
|
||||
<div class="icon-database icon-purple">
|
||||
{% include "lean-console/svg/icon-database.svg" %}
|
||||
</div>
|
||||
|
||||
<h2>{% _.raw 'database.connection', [ 'name' => $connection->name ] %}</h2>
|
||||
</header>
|
||||
<h2>{% _.raw 'database.connection', [ 'name' => $connection->name ] %}</h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
{% ui:form.post "database.migrate", current_url() %}
|
||||
<article>
|
||||
{% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
|
||||
{% if empty($context->definition[$entity]) %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
<div class="single-table grid">
|
||||
<div class="col-5 col-xxl flex align-items-center">
|
||||
<div class="icon-yellow">
|
||||
@@ -45,6 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-5 col-lg flex align-items-center">
|
||||
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
|
||||
<code class="query">{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
|
||||
@@ -55,29 +60,29 @@
|
||||
|
||||
<div class="col-2 col-lg flex align-items-center">
|
||||
<div class="btn-wrapper">
|
||||
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
|
||||
{% case ModifierTypeEnum::Create %}
|
||||
{% php $createAll[] = $entity %}
|
||||
<button name="create" value="{{$entity}}" class="btn-red btn-sm">✓ {% _ 'database.table.create' %}</button>
|
||||
</div>
|
||||
{% break %}
|
||||
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
|
||||
{% case ModifierTypeEnum::Create %}
|
||||
{% php $createAll[] = $entity %}
|
||||
<button name="create" value="{{$entity}}" class="btn-red btn-sm">✓ {% _ 'database.table.create' %}</button>
|
||||
{% break %}
|
||||
|
||||
{% case ModifierTypeEnum::Alter %}
|
||||
{% php $alterAll[] = $entity %}
|
||||
<button name="alter" value="{{$entity}}" class="btn-blue btn-sm">✓ {% _ 'database.table.alter' %}</button>
|
||||
{% break %}
|
||||
|
||||
{% endswitch %}
|
||||
|
||||
{% case ModifierTypeEnum::Alter %}
|
||||
{% php $alterAll[] = $entity %}
|
||||
<button name="alter" value="{{$entity}}" class="btn-blue btn-sm">✓ {% _ 'database.table.alter' %}</button>
|
||||
{% break %}
|
||||
{% endswitch %}
|
||||
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-purple btn-sm">{% _ 'database.table.add-column' %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endforeach %}
|
||||
{% ui:endform %}
|
||||
</article>
|
||||
</section>
|
||||
{% endforeach %}
|
||||
</article>
|
||||
</section>
|
||||
{% endforeach %}
|
||||
{% ui:endform %}
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
.connection .single-table {padding: 10px 5px 10px 5px;}
|
||||
.connection .single-table:nth-child(2n + 1) {background: #fafafa;}
|
||||
|
||||
Reference in new issue
Block a user