mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-07 19:29:20 +02:00
- add podcast sidebar navigation - add podcast dashboard with latest episodes - add pagination to podcast episodes - add components helper to reuse ui components (button, data_table, etc.) - enhance podcast and episode forms by splitting them into form sections - add hint tooltips to podcast and episode forms - transform radio inputs as buttons for better ux - replace explicit field by parental_advisory - replace author field by publisher - add podcasts_categories table to set multiple categories - use choices.js to enhance multiselect fields - update Language files - update js dependencies to latest versions closes #31, #9
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Class AddPodcastsCategories
|
|
* Creates podcasts_categories table in database
|
|
*
|
|
* @copyright 2020 Podlibre
|
|
* @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 AddPodcastsCategories extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->forge->addField([
|
|
'podcast_id' => [
|
|
'type' => 'BIGINT',
|
|
'constraint' => 20,
|
|
'unsigned' => true,
|
|
],
|
|
'category_id' => [
|
|
'type' => 'INT',
|
|
'constraint' => 10,
|
|
'unsigned' => true,
|
|
],
|
|
]);
|
|
$this->forge->addPrimaryKey(['podcast_id', 'category_id']);
|
|
$this->forge->addForeignKey('podcast_id', 'podcasts', 'id');
|
|
$this->forge->addForeignKey('category_id', 'categories', 'id');
|
|
$this->forge->createTable('podcasts_categories');
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropTable('podcasts_categories');
|
|
}
|
|
}
|