forge->addField([ 'slug' => [ 'type' => 'VARCHAR', 'constraint' => 32, ], 'type' => [ 'type' => 'ENUM', 'constraint' => ['podcasting', 'social', 'funding'], ], 'label' => [ 'type' => 'VARCHAR', 'constraint' => 32, ], 'home_url' => [ 'type' => 'VARCHAR', 'constraint' => 255, ], 'submit_url' => [ 'type' => 'VARCHAR', 'constraint' => 512, 'null' => true, 'default' => null, ], ]); $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->addKey('slug', true); $this->forge->createTable('platforms'); } public function down() { $this->forge->dropTable('platforms'); } }