Skip to content
Snippets Groups Projects
2021-06-05-190000_add_platforms.php 1.51 KiB
Newer Older
  • Learn to ignore specific revisions
  • <?php
    
     * Class AddPlatforms Creates platforms table in database
    
     * @copyright  2020 Ad Aures
    
     * @license    https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
     * @link       https://castopod.org/
     */
    
    namespace App\Database\Migrations;
    
    
    class AddPlatforms extends BaseMigration
    
        {
            $this->forge->addField([
    
                    'constraint' => ['podcasting', 'social', 'funding'],
    
                'submit_url' => [
    
            $this->forge->addField('`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP()');
            $this->forge->addField(
    
                '`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP()',
    
            $this->forge->addPrimaryKey('slug');
    
            $this->forge->createTable('platforms');
        }
    
    
        {
            $this->forge->dropTable('platforms');
        }
    }