mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-11 00:35:47 +00:00

- harmonize field types and use explicit names - store html value alongside markdown descriptions for better performance - add duration and bandwidth to podcast analytics - add new analytics table for podcast hits by hour - replace visible MAXMIND_LICENCE_KEY with variable
40 lines
874 B
PHP
40 lines
874 B
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,
|
|
],
|
|
'native_name' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 128,
|
|
],
|
|
]);
|
|
$this->forge->addKey('code', true);
|
|
$this->forge->createTable('languages');
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropTable('languages');
|
|
}
|
|
}
|