castopod/modules/Media/Database/Migrations/2022-30-12-180000_rename_me...

41 lines
866 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 Media\Database\Migrations;
use CodeIgniter\Database\Migration;
class RenameMediafileKey extends Migration
{
public function up(): void
{
$fields = [
'file_key' => [
'name' => 'file_key',
'type' => 'VARCHAR',
'constraint' => 255,
],
];
$this->forge->modifyColumn('media', $fields);
}
public function down(): void
{
$fields = [
'file_key' => [
'name' => 'file_key',
'type' => 'VARCHAR',
'constraint' => 255,
],
];
$this->forge->modifyColumn('media', $fields);
}
}