mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-12 14:09:31 +00:00
Fix migration issues
This commit is contained in:
parent
71102f0ad9
commit
ec7f79369d
2 changed files with 13 additions and 3 deletions
|
|
@ -24,6 +24,16 @@ final class Version20240905085300 extends AbstractMultiPlatformMigration
|
||||||
$this->addSql('ALTER TABLE `parts` DROP orderamount, DROP orderDelivery');
|
$this->addSql('ALTER TABLE `parts` DROP orderamount, DROP orderDelivery');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function postgreSQLUp(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE parts ADD orderamount DOUBLE PRECISION NOT NULL DEFAULT 0, ADD orderDelivery timestamp');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function postgreSQLDown(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE parts DROP orderamount, DROP orderDelivery');
|
||||||
|
}
|
||||||
|
|
||||||
public function sqLiteUp(Schema $schema): void
|
public function sqLiteUp(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('ALTER TABLE parts ADD COLUMN orderamount DOUBLE PRECISION NOT NULL DEFAULT 0');
|
$this->addSql('ALTER TABLE parts ADD COLUMN orderamount DOUBLE PRECISION NOT NULL DEFAULT 0');
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,10 @@
|
||||||
{% if part.orderAmount > 0 %}
|
{% if part.orderAmount > 0 %}
|
||||||
(+
|
(+
|
||||||
<span title="{% trans %}orderstock.label{% endtrans %}">{{ part.orderAmount | format_amount(part.partUnit) }}</span>
|
<span title="{% trans %}orderstock.label{% endtrans %}">{{ part.orderAmount | format_amount(part.partUnit) }}</span>
|
||||||
{% if part.orderDate %}
|
{% if part.orderDelivery %}
|
||||||
@
|
@
|
||||||
<span class="badge bg-info mb-1" title="{% trans %}part.filter.orderDate{% endtrans %}">
|
<span class="badge bg-info mb-1" title="{% trans %}part.filter.orderDelivery{% endtrans %}">
|
||||||
<i class="fas fa-calendar-alt fa-fw"></i> {{ part.orderDate | format_date() }}<br>
|
<i class="fas fa-calendar-alt fa-fw"></i> {{ part.orderDelivery | format_date() }}<br>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue