feat: add upgrade instructions
This commit is contained in:
parent
0523000708
commit
f0ec585396
1 changed files with 41 additions and 13 deletions
|
@ -67,20 +67,48 @@ $page->navigation();
|
||||||
<?= $page->messages() ?>
|
<?= $page->messages() ?>
|
||||||
|
|
||||||
<?php if (-1 === version_compare($options->version, VERSION)) { ?>
|
<?php if (-1 === version_compare($options->version, VERSION)) { ?>
|
||||||
<div class="ui segment">
|
<?php
|
||||||
<h2 class="ui header"><?= __('Database migration') ?></h2>
|
switch ($options->version) {
|
||||||
<p><?= __('Thank you for updating wishthis! To complete this update, some changes are required to the database structure.') ?></p>
|
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">
|
<form class="ui form" method="POST">
|
||||||
<button class="ui orange button"
|
<button class="ui orange button"
|
||||||
type="submit"
|
type="submit"
|
||||||
title="<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>"
|
title="<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>"
|
||||||
>
|
>
|
||||||
<i class="upload icon"></i>
|
<i class="upload icon"></i>
|
||||||
<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>
|
<?= sprintf(__('Migrate to %s'), 'v' . VERSION) ?>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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 } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in a new issue