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

- set and remove platform links for a podcast - remove unnecessary fields from platforms and platform_links tables - add platforms svg icons to show in form - update platform and auth seeders - update svgo config for images
66 lines
1.6 KiB
PHP
66 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Class AddPlatforms
|
|
* Creates platforms 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 AddPlatforms extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->forge->addField([
|
|
'id' => [
|
|
'type' => 'BIGINT',
|
|
'constraint' => 20,
|
|
'unsigned' => true,
|
|
'auto_increment' => true,
|
|
],
|
|
'name' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 191,
|
|
'unique' => true,
|
|
],
|
|
'label' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 191,
|
|
],
|
|
'home_url' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 191,
|
|
],
|
|
'submit_url' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 191,
|
|
'null' => true,
|
|
'default' => null,
|
|
],
|
|
'icon_filename' => [
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 1024,
|
|
],
|
|
'created_at' => [
|
|
'type' => 'TIMESTAMP',
|
|
],
|
|
'updated_at' => [
|
|
'type' => 'TIMESTAMP',
|
|
],
|
|
]);
|
|
$this->forge->addKey('id', true);
|
|
$this->forge->createTable('platforms');
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropTable('platforms');
|
|
}
|
|
}
|