Fixed theme migration script

这个提交包含在:
Andreas 2023-12-07 11:11:43 +01:00
父节点 3b8bac7c13
当前提交 fae7ee8d56

查看文件

@ -10,12 +10,12 @@ class Migration_wide_themes extends CI_Migration
{ {
public function up() public function up()
{ {
$this->db->query("INSERT INTO themes (name, foldername) SELECT 'Blue wide','blue_wide' WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'blue_wide');"); $this->db->query("INSERT INTO themes (name, foldername) SELECT DISTINCT 'Blue wide','blue_wide' FROM themes WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'blue_wide');");
$this->db->query("INSERT INTO themes (name, foldername) SELECT 'Cosmo wide','cosmo_wide' WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'cosmo_wide');"); $this->db->query("INSERT INTO themes (name, foldername) SELECT DISTINCT 'Cosmo wide','cosmo_wide' FROM themes WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'cosmo_wide');");
$this->db->query("INSERT INTO themes (name, foldername) SELECT 'Cyborg wide (Dark)','cyborg_wide' WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'cyborg_wide');"); $this->db->query("INSERT INTO themes (name, foldername) SELECT DISTINCT 'Cyborg wide (Dark)','cyborg_wide' FROM themes WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'cyborg_wide');");
$this->db->query("INSERT INTO themes (name, foldername) SELECT 'Darkly wide (Dark)','darkly_wide' WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'darkly_wide');"); $this->db->query("INSERT INTO themes (name, foldername) SELECT DISTINCT 'Darkly wide (Dark)','darkly_wide' FROM themes WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'darkly_wide');");
$this->db->query("INSERT INTO themes (name, foldername) SELECT 'Default wide','default_wide' WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'default_wide');"); $this->db->query("INSERT INTO themes (name, foldername) SELECT DISTINCT 'Default wide','default_wide' FROM themes WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'default_wide');");
$this->db->query("INSERT INTO themes (name, foldername) SELECT 'Superhero wide (Dark)','superhero_wide' WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'superhero_wide');"); $this->db->query("INSERT INTO themes (name, foldername) SELECT DISTINCT 'Superhero wide (Dark)','superhero_wide' FROM themes WHERE NOT EXISTS (SELECT 1 FROM themes WHERE foldername = 'superhero_wide');");
} }
public function down() public function down()