mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-11 16:55:46 +00:00

- add installGateway to app config - update route names and groups - remove `author_name` and `author_email` from `episodes` table - remove `author_name` and `author_email` from `podcasts` table - remove `owner_id` + add `created_by` and `updated_by` fields in `podcasts` and `episodes` tables - remove unnecessary comments in database fields - remove confirm password inputs from auth forms for better ux - rename `pub_date` field to `published_at` and add publication time field in episode form closes #14, #28
45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Class AddLanguages
|
|
* Creates languages 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 AddLanguages extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->forge->addField([
|
|
'code' => [
|
|
'type' => 'VARCHAR',
|
|
'comment' => 'ISO 639-1 language code.',
|
|
'constraint' => 2,
|
|
],
|
|
'name' => [
|
|
'type' => 'VARCHAR',
|
|
'comment' => 'English language name.',
|
|
'constraint' => 191,
|
|
],
|
|
'native_name' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 191,
|
|
],
|
|
]);
|
|
$this->forge->addKey('code', true);
|
|
$this->forge->createTable('languages');
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropTable('languages');
|
|
}
|
|
}
|