'Aircraft', 'description' => 'Planes, helicopters, and drones', ], [ 'name' => 'Automotive', 'description' => 'Cars, trucks, and vehicles', ], [ 'name' => 'Characters', 'description' => 'Humanoid and creature models', ], [ 'name' => 'Props', 'description' => 'Objects and accessories', ], [ 'name' => 'Terrain', 'description' => 'Landscapes, buildings, and scenery', ], [ 'name' => 'Tools', 'description' => 'Functional items and gadgets', ], ]; foreach ($categories as $category) { $exists = $this->getAdapter()->fetchRow( "SELECT id FROM categories WHERE name = '" . $category['name'] . "'" ); if (!$exists) { $this->getAdapter()->execute( "INSERT INTO categories (name, description) VALUES ('" . $category['name'] . "', '" . $category['description'] . "')" ); } } // Seed default tags $tags = [ ['name' => 'wip'], ['name' => 'completed'], ['name' => 'high-poly'], ['name' => 'low-poly'], ['name' => 'print-ready'], ['name' => 'needs-supports'], ['name' => 'articulated'], ['name' => 'modular'], ['name' => 'multi-part'], ['name' => 'single-piece'], ]; foreach ($tags as $tag) { $exists = $this->getAdapter()->fetchRow( "SELECT id FROM tags WHERE name = '" . $tag['name'] . "'" ); if (!$exists) { $this->getAdapter()->execute( "INSERT INTO tags (name) VALUES ('" . $tag['name'] . "')" ); } } } }