mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-09 04:09:24 +02:00
34 lines
766 B
PHP
34 lines
766 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* @copyright 2022 Ad Aures
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace Modules\WebSub\Database\Migrations;
|
|
|
|
use App\Database\Migrations\BaseMigration;
|
|
|
|
class AddIsPublishedOnHubsToPodcasts extends BaseMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
$prefix = $this->db->getPrefix();
|
|
|
|
$createQuery = <<<CODE_SAMPLE
|
|
ALTER TABLE {$prefix}podcasts
|
|
ADD COLUMN `is_published_on_hubs` BOOLEAN NOT NULL DEFAULT 0 AFTER `custom_rss`;
|
|
CODE_SAMPLE;
|
|
|
|
$this->db->query($createQuery);
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
$this->forge->dropColumn('podcasts', 'is_published_on_hubs');
|
|
}
|
|
}
|