feat: add upgrade instructions

This commit is contained in:
grandeljay 2023-08-25 13:46:38 +02:00
parent 0523000708
commit f0ec585396

View file

@ -67,20 +67,48 @@ $page->navigation();
<?= $page->messages() ?>
<?php if (-1 === version_compare($options->version, VERSION)) { ?>
<div class="ui segment">
<h2 class="ui header"><?= __('Database migration') ?></h2>
<p><?= __('Thank you for updating wishthis! To complete this update, some changes are required to the database structure.') ?></p>
<?php
switch ($options->version) {
case '1.0.0':
?>
<div class="ui segment">
<h2 class="ui header"><?= __('Database migration') ?></h2>
<p><?= __('Thank you for updating wishthis! To complete this update, some changes are required to the database structure.') ?></p>
<?= Page::warning('Attention! You need to update your config.php in order for wishthis to continue working. Please refer to your config-sample.php. In particular the namespace must be added!', 'Warning') ?>
<form class="ui form" method="POST">
<button class="ui orange button"
type="submit"
title="<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>"
>
<i class="upload icon"></i>
<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>
</button>
</form>
</div>
<form class="ui form" method="POST">
<button class="ui orange button"
type="submit"
title="<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>"
>
<i class="upload icon"></i>
<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>
</button>
</form>
</div>
<?php
break;
default:
?>
<div class="ui segment">
<h2 class="ui header"><?= __('Database migration') ?></h2>
<p><?= __('Thank you for updating wishthis! To complete this update, some changes are required to the database structure.') ?></p>
<form class="ui form" method="POST">
<button class="ui orange button"
type="submit"
title="<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>"
>
<i class="upload icon"></i>
<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>
</button>
</form>
</div>
<?php
break;
}
?>
<?php } ?>
</div>
</main>