mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-14 02:05:47 +00:00
41 lines
866 B
PHP
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);
|
||
|
}
|
||
|
}
|