Commit d0836f3e authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: add about page in admin with instance info + database update button

parent c668f1c1
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ class Autoload extends AutoloadConfig
        'Modules\Auth' => ROOTPATH . 'modules/Auth/',
        'Modules\Analytics' => ROOTPATH . 'modules/Analytics/',
        'Modules\Install' => ROOTPATH . 'modules/Install/',
        'Modules\Update' => ROOTPATH . 'modules/Update/',
        'Modules\Fediverse' => ROOTPATH . 'modules/Fediverse/',
        'Modules\WebSub' => ROOTPATH . 'modules/WebSub/',
        'Modules\Api\Rest\V1' => ROOTPATH . 'modules/Api/Rest/V1',
+35 −0
Original line number Diff line number Diff line
<?php

declare(strict_types=1);

/**
 * Class AddCreatedByToPosts Adds created_by field to posts table in database
 *
 * @copyright  2020 Ad Aures
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
 * @link       https://castopod.org/
 */

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddTestingUpdate extends Migration
{
    public function up(): void
    {
        $this->forge->addColumn('podcasts', [
            'cool_update' => [
                'type' => 'INT',
                'unsigned' => true,
                'null' => true,
                'after' => 'custom_rss',
            ],
        ]);
    }

    public function down(): void
    {
        $this->forge->dropColumn('podcasts', 'cool_update');
    }
}
+4 −0
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path fill="none" d="M0 0h24v24H0z"/>
    <path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-11v6h2v-6h-2zm0-4v2h2V7h-2z"/>
</svg>
+28 −12
Original line number Diff line number Diff line
@@ -9,11 +9,13 @@ After installing Castopod, you may want to update your instance to the latest
version in order to enjoy the latest features ✨, bug fixes 🐛 and performance
improvements ⚡.

## Automatic update instructions
## Update instructions

> Coming soon... 👀
0. ⚠️ Before any update, we highly recommend you backup your Castopod files and
   database.

## Manual update instructions
   - cf.
     [Should I make a backup before updating?](#should-i-make-a-backup-before-updating)

1. Go to the
   [releases page](https://code.castopod.org/adaures/castopod/-/releases) and
@@ -26,6 +28,8 @@ improvements ⚡.
   between the `zip` or `tar.gz` archives

   - ⚠️ Make sure you download the Castopod Package and **NOT** the Source Code
   - Note that you can also download the latest package from
     [castopod.org](https://castopod.org/)

3. On your server:

@@ -39,18 +43,30 @@ improvements ⚡.

     :::

4. Releases may come with additional update instructions (see
   [releases page](https://code.castopod.org/adaures/castopod/-/releases)). They
   are usually database migration scripts in `.sql` format to update your
   database schema.
4. Update your database schema from your `Castopod Admin` > `About` page or by
   running:

   ```bash
   php spark castopod:database-update
   ```

5. Clear your cache from your `Castopod Admin` > `Settings` > `general` >
   `Housekeeping`
6. ✨ Enjoy your fresh instance, you're all done!

::: info Note

Releases may come with additional update instructions (see
[releases page](https://code.castopod.org/adaures/castopod/-/releases)).

   - 👉 Make sure you run the scripts on your phpmyadmin panel or using command
     line to update the database along with the package files!
- cf.
  [I haven't updated my instance in a long time… What should I do?](#i-havent-updated-my-instance-in-a-long-time-what-should-i-do)

5. If you are using redis, clear your cache.
6. ✨ Enjoy your fresh instance, you're all done!
:::

## Fully Automated updates

> Coming soon... 👀

## Frequently asked questions (FAQ)

+10 −0
Original line number Diff line number Diff line
@@ -644,5 +644,15 @@ $routes->group(
                ]);
            });
        });

        $routes->get('about', 'AboutController', [
            'as' => 'admin-about',
            'filter' => 'permission:admin.settings',
        ]);

        $routes->post('update', 'AboutController::updateAction', [
            'as' => 'update',
            'filter' => 'permission:admin.settings',
        ]);
    },
);
Loading