Skip to content
Snippets Groups Projects
2021-05-29-152000_add_categories.php 1.36 KiB
Newer Older
 * Class AddCategories Creates categories table in database
 * @copyright  2020 Ad Aures
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
 * @link       https://castopod.org/
 */
class AddCategories extends BaseMigration
                'unsigned' => true,
            'parent_id' => [
                'unsigned' => true,
            ],
            'apple_category' => [
        $this->forge->addUniqueKey('code');
        $this->forge->addForeignKey('parent_id', 'categories', 'id');
        $this->forge->createTable('categories');
    }

    {
        $this->forge->dropTable('categories');
    }
}