Skip to content

Commit

Permalink
Merge pull request #1295 from proditis/towards-v1.0.0
Browse files Browse the repository at this point in the history
Towards v1.0.0-rc1
  • Loading branch information
proditis authored Nov 12, 2024
2 parents b0ffc7d + 7bb2d92 commit 9262ea7
Show file tree
Hide file tree
Showing 275 changed files with 2,802 additions and 10,819 deletions.
91 changes: 91 additions & 0 deletions .github/clean_events_sql.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?php
/**
* mysqldump --no-data --no-create-info --skip-triggers --no-create-db --events echoCTF | php clean_events_sql.php "php://stdin"
*/
$rmline[]="/*!50003 SET @saved_time_zone = @@time_zone */ ;;\n";
$rmline[]="/*!50003 SET time_zone = 'SYSTEM' */ ;;\n";
$rmline[]="/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;\n";
$rmline[]="/*!50003 SET time_zone = @saved_time_zone */ ;;\n";
$rmline[]="/*!50003 SET sql_mode = @saved_sql_mode */ ;;\n";
$rmline[]="/*!50003 SET character_set_client = @saved_cs_client */ ;;\n";
$rmline[]="/*!50003 SET character_set_results = @saved_cs_results */ ;;\n";
$rmline[]="/*!50003 SET collation_connection = @saved_col_connection */ ;;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb4 */ ;;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb4 */ ;;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb4_general_ci */ ;;\n";
$rmline[]="/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;\n";
$rmline[]="/*!50003 SET sql_mode = @saved_sql_mode */ ;\n";
$rmline[]="/*!50003 SET character_set_client = @saved_cs_client */ ;\n";
$rmline[]="/*!50003 SET character_set_results = @saved_cs_results */ ;\n";
$rmline[]="/*!50003 SET collation_connection = @saved_col_connection */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_client = @@character_set_client */ ;;\n";
$rmline[]="/*!50003 SET @saved_cs_client = @@character_set_client */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_results = @@character_set_results */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_results = @@character_set_results */ ;;\n";
$rmline[]="/*!50003 SET @saved_col_connection = @@collation_connection */ ;\n";
$rmline[]="/*!50003 SET @saved_col_connection = @@collation_connection */ ;;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb4 */ ;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb4 */ ;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb4_general_ci */ ;\n";
$rmline[]="/*!50003 SET @saved_sql_mode = @@sql_mode */ ;\n";
$rmline[]="/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;\n";
$rmline[]="/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb3 */ ;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb3 */ ;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb3_general_ci */ ;\n";
$rmline[]="/*!50003 SET sql_mode = '' */ ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ;;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;;\n";
$rmline[]="/*!50017 DEFINER=`moderatorUI`@`10.7.0.201`*/";
$rmline[]="/*!50017 DEFINER=`root`@`localhost`*/";
$rmline[]="/*!50003 SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO' */ ;\n";
$rmline[]="DELIMITER ;\n";
$rmline[]="DELIMITER ;;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb3_unicode_ci */ ;;\n";
$rmline[]=" DEFINER=`root`@`localhost`";
$rmline[]=" DEFINER=`moderatorUI`@`10.7.0.201`";
$rmline[]="/*!50117*/ ";
$rmline[]="/*!50003 SET time_zone = 'UTC' */ ;;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb3 */ ;;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb3 */ ;;\n";
$rmline[]="/*!50003 SET sql_mode = '' */ ;;\n";
$rmline[]="/*!50003 SET time_zone = '+00:00' */ ;;\n";
$input=explode("\n",file_get_contents($argv[1]));
array_splice($input, 1, 5);
array_pop($input);
//array_pop($input);
//
$input=implode("\n",$input);
$input=str_replace($rmline, "", $input);

$rpline=[
"/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;" => "/*!40101 SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci */;",
'/*!50003 CREATE*/'=>'CREATE',
'/*!50106 CREATE*/'=>'CREATE',
'/*!50003 TRIGGER'=>'TRIGGER',
'/*!50106 EVENT '=>'EVENT',
'END */;;' => "END ;;\n",
'END */ ;;'=>"END ;;",
'END ;;' => "END ;;\n",
"CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci" => "CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci",
"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;"=>"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\nDELIMITER ;;"
];
foreach($rpline as $key => $val)
{
$input=str_replace($key, $val, $input);
}

$regline=['/\/\*!50106 DROP EVENT IF EXISTS `(\w+)` \*\/;/' => 'DROP EVENT IF EXISTS `$1` ;'];
foreach($regline as $key => $val)
{
$input=preg_replace($key,$val,$input);
}

echo $input;

64 changes: 64 additions & 0 deletions .github/clean_routines_sql.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* mysqldump --no-data --no-create-info --skip-triggers --routines --skip-opt echoCTF| php clean_routines_sql.php "php://stdin"
*/
$rmline[]="/*!50003 SET sql_mode = @saved_sql_mode */ ;\n";
$rmline[]="/*!50003 SET character_set_client = @saved_cs_client */ ;\n";
$rmline[]="/*!50003 SET character_set_results = @saved_cs_results */ ;\n";
$rmline[]="/*!50003 SET collation_connection = @saved_col_connection */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_client = @@character_set_client */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_results = @@character_set_results */ ;\n";
$rmline[]="/*!50003 SET @saved_col_connection = @@collation_connection */ ;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb4 */ ;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb4 */ ;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb4_general_ci */ ;\n";
$rmline[]="/*!50003 SET @saved_sql_mode = @@sql_mode */ ;\n";
$rmline[]="/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb3 */ ;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb3 */ ;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb3_general_ci */ ;\n";
$rmline[]="/*!50003 SET sql_mode = '' */ ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;\n";
$rmline[]="/*!50017 DEFINER=`moderatorUI`@`10.7.0.201`*/";
$rmline[]="/*!50017 DEFINER=`root`@`localhost`*/";
$rmline[]="/*!50003 SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO' */ ;\n";
$rmline[]="DELIMITER ;\n";
$rmline[]="DELIMITER ;;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb3_unicode_ci */ ;";
$rmline[]=" DEFINER=`root`@`localhost`";
$rmline[]=" DEFINER=`moderatorUI`@`10.7.0.201`";
$input=explode("\n",file_get_contents($argv[1]));
array_splice($input, 1, 5);
//array_pop($input);
//array_pop($input);
//
$input=implode("\n",$input);
$input=str_replace($rmline, "", $input);


$rpline=[
"/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;" => "/*!40101 SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci */;",
'/*!50003 CREATE*/'=>'CREATE',
'/*!50003 TRIGGER'=>'TRIGGER',
'END */;;' => "END ;;\n",
'END ;;' => "END ;;\n",
'/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;' => "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n/*!40101 SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci */;\nDELIMITER ;;",
"CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci" => "CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci"
];
foreach($rpline as $key => $val)
{
$input=str_replace($key, $val, $input);
}

$regline=['/\/\*!50032 DROP TRIGGER IF EXISTS (\w+) \*\/;/' => 'DROP TRIGGER IF EXISTS $1 ;;'];
foreach($regline as $key => $val)
{
$input=preg_replace($key,$val,$input);
}

echo $input;

60 changes: 60 additions & 0 deletions .github/clean_trigger_sql.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* mysqldump --no-data --no-create-info --triggers --add-drop-trigger echoCTF|php clean_trigger_sql.php "php://stdin"
*/
$rmline[]="/*!50003 SET sql_mode = @saved_sql_mode */ ;\n";
$rmline[]="/*!50003 SET character_set_client = @saved_cs_client */ ;\n";
$rmline[]="/*!50003 SET character_set_results = @saved_cs_results */ ;\n";
$rmline[]="/*!50003 SET collation_connection = @saved_col_connection */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_client = @@character_set_client */ ;\n";
$rmline[]="/*!50003 SET @saved_cs_results = @@character_set_results */ ;\n";
$rmline[]="/*!50003 SET @saved_col_connection = @@collation_connection */ ;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb4 */ ;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb4 */ ;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb4_general_ci */ ;\n";
$rmline[]="/*!50003 SET @saved_sql_mode = @@sql_mode */ ;\n";
$rmline[]="/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;\n";
$rmline[]="/*!50003 SET character_set_client = utf8mb3 */ ;\n";
$rmline[]="/*!50003 SET character_set_results = utf8mb3 */ ;\n";
$rmline[]="/*!50003 SET collation_connection = utf8mb3_general_ci */ ;\n";
$rmline[]="/*!50003 SET sql_mode = '' */ ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;\n";
$rmline[]="ALTER DATABASE `echoCTF` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;\n";
$rmline[]="/*!50017 DEFINER=`moderatorUI`@`10.7.0.201`*/";
$rmline[]="/*!50017 DEFINER=`root`@`localhost`*/";
$rmline[]="/*!50003 SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO' */ ;\n";
$rmline[]="DELIMITER ;\n";
$rmline[]="DELIMITER ;;\n";

$input=explode("\n",file_get_contents($argv[1]));
array_splice($input, 1, 6);
array_pop($input);
array_pop($input);

$input=implode("\n",$input);
$input=str_replace($rmline, "", $input);


$rpline=[
"/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;" => "/*!40101 SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci */;",
'/*!50003 CREATE*/'=>'CREATE',
'/*!50003 TRIGGER'=>'TRIGGER',
'END */;;' => "END ;;\n",
'/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;' => "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\nDELIMITER ;;"
];
foreach($rpline as $key => $val)
{
$input=str_replace($key, $val, $input);
}

$regline=['/\/\*!50032 DROP TRIGGER IF EXISTS (\w+) \*\/;/' => 'DROP TRIGGER IF EXISTS $1 ;;'];
foreach($regline as $key => $val)
{
$input=preg_replace($key,$val,$input);
}

echo $input;

81 changes: 40 additions & 41 deletions backend/migrations-init/m200309_075759_populate_levels.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,48 @@
*/
class m200309_075759_populate_levels extends Migration
{
public $experiences=[
['name'=>'New', 'description'=>'User just started', 'icon'=> 'default.png'],
['name'=>'Securitas', 'description'=>'test', 'icon'=> 'default.png'],
['name'=>'PenTester', 'description'=>'test', 'icon'=> 'default.png'],
['name'=>'CTFer', 'description'=>'test', 'icon'=> 'default.png'],
['name'=>'Hax0r', 'description'=>'test', 'icon'=> 'default.png'],
public $experiences = [
['name' => 'New', 'description' => 'User just started', 'icon' => 'default.png'],
['name' => 'Securitas', 'description' => 'test', 'icon' => 'default.png'],
['name' => 'PenTester', 'description' => 'test', 'icon' => 'default.png'],
['name' => 'CTFer', 'description' => 'test', 'icon' => 'default.png'],
['name' => 'Hax0r', 'description' => 'test', 'icon' => 'default.png'],
];
/**
* {@inheritdoc}
*/
public function safeUp()
{
$min_points=0;
$max_points=1000;
$step=1000;
$dyn=1;
$lvl=0;
for($i=0;$i < 20;$i++)
{
$xp=[];
$xp['id']=intval($i + 1);
$xp['name']=sprintf("%s %d", $this->experiences[$lvl]['name'], ($dyn % 5));
$xp['category']=sprintf("%s", $this->experiences[$lvl]['name']);
$xp['description']='autogen';
$xp['icon']='default.png';
$xp['min_points']=intval($min_points);
$xp['max_points']=intval($max_points + ($step * ($i == 0 ? $i : $i + 1)));
$this->db->createCommand()->insert('{{%experience}}', $xp)->execute();
$max_points=$xp['max_points'];
$min_points=$max_points + 1;
if(($dyn % 4) == 0)
{
$lvl++;$dyn=0;}
$dyn++;
/**
* {@inheritdoc}
*/
public function safeUp()
{
$min_points = 0;
$max_points = 1000;
$step = 1000;
$dyn = 1;
$lvl = 0;
for ($i = 0; $i < 20; $i++) {
$xp = [];
$xp['id'] = intval($i + 1);
$xp['name'] = sprintf("%s %d", $this->experiences[$lvl]['name'], ($dyn % 5));
$xp['category'] = sprintf("%s", $this->experiences[$lvl]['name']);
$xp['description'] = 'autogen';
$xp['icon'] = 'default.png';
$xp['min_points'] = intval($min_points);
$xp['max_points'] = intval($max_points + ($step * ($i == 0 ? $i : $i + 1)));
$this->upsert('{{%experience}}', $xp);
$max_points = $xp['max_points'];
$min_points = $max_points + 1;
if (($dyn % 4) == 0) {
$lvl++;
$dyn = 0;
}
$dyn++;
}
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->db->createCommand()->truncateTable('{{%experience}}')->execute();
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->db->createCommand()->truncateTable('{{%experience}}')->execute();
}
}
7 changes: 3 additions & 4 deletions backend/migrations-init/m200309_081940_populate_countries.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class m200309_081940_populate_countries extends Migration
*/
public function safeUp()
{
$CREATE_SQL="INSERT INTO country VALUES ('UNK', 'Not set');
INSERT INTO country VALUES ('AF','Afghanistan'),
$CREATE_SQL="INSERT IGNORE INTO country VALUES ('UNK', 'Not set');
INSERT IGNORE INTO country VALUES ('AF','Afghanistan'),
('AL','Albania'),('DZ','Algeria'),('AS','American Samoa'),('AD','Andorra'),('AO','Angola'),
('AI','Anguilla'),('AQ','Antarctica'),('AG','Antigua and Barbuda'),('AR','Argentina'),
('AM','Armenia'),('AW','Aruba'),('AU','Australia'),('AT','Austria'),('AZ','Azerbaijan'),
Expand Down Expand Up @@ -81,8 +81,7 @@ public function safeUp()
('GB','United Kingdom'),('US','United States'),('UM','United States Minor Outlying Islands'),
('UY','Uruguay'),('UZ','Uzbekistan'),('VU','Vanuatu'),('VE','Venezuela'),('VN','Viet Nam'),
('VG','Virgin Islands, British'),('VI','Virgin Islands, U.s.'),('WF','Wallis and Futuna'),
('EH','Western Sahara'),('YE','Yemen'),('ZM','Zambia'),('ZW','Zimbabwe');
";
('EH','Western Sahara'),('YE','Yemen'),('ZM','Zambia'),('ZW','Zimbabwe')";
$this->db->createCommand($CREATE_SQL)->execute();

}
Expand Down
55 changes: 7 additions & 48 deletions backend/migrations-init/m200309_082230_populate_avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,13 @@ class m200309_082230_populate_avatars extends Migration
*/
public function safeUp()
{
$CREATE_SQL="INSERT INTO avatar value ('256_10.png');
INSERT INTO avatar value ('256_11.png');
INSERT INTO avatar value ('256_12.png');
INSERT INTO avatar value ('256_13.png');
INSERT INTO avatar value ('256_14.png');
INSERT INTO avatar value ('256_15.png');
INSERT INTO avatar value ('256_16.png');
INSERT INTO avatar value ('256_1.png');
INSERT INTO avatar value ('256_2.png');
INSERT INTO avatar value ('256_3.png');
INSERT INTO avatar value ('256_4.png');
INSERT INTO avatar value ('256_5.png');
INSERT INTO avatar value ('256_6.png');
INSERT INTO avatar value ('256_7.png');
INSERT INTO avatar value ('256_8.png');
INSERT INTO avatar value ('256_9.png');
INSERT INTO avatar value ('avatar-1.png');
INSERT INTO avatar value ('avatar-2.png');
INSERT INTO avatar value ('avatar-3.png');
INSERT INTO avatar value ('avatar-4.png');
INSERT INTO avatar value ('avatar-5.png');
INSERT INTO avatar value ('avatar-6.png');
INSERT INTO avatar value ('avatar-7.png');
INSERT INTO avatar value ('avatar-8.png');
INSERT INTO avatar value ('Bride.png');
INSERT INTO avatar value ('default.png');
INSERT INTO avatar value ('Franky.png');
INSERT INTO avatar value ('Skeleton.png');
INSERT INTO avatar value ('users-10.svg');
INSERT INTO avatar value ('users-11.svg');
INSERT INTO avatar value ('users-12.svg');
INSERT INTO avatar value ('users-13.svg');
INSERT INTO avatar value ('users-14.svg');
INSERT INTO avatar value ('users-15.svg');
INSERT INTO avatar value ('users-16.svg');
INSERT INTO avatar value ('users-1.svg');
INSERT INTO avatar value ('users-2.svg');
INSERT INTO avatar value ('users-3.svg');
INSERT INTO avatar value ('users-4.svg');
INSERT INTO avatar value ('users-5.svg');
INSERT INTO avatar value ('users-6.svg');
INSERT INTO avatar value ('users-7.svg');
INSERT INTO avatar value ('users-8.svg');
INSERT INTO avatar value ('users-9.svg');
INSERT INTO avatar value ('Vampire-Girl.png');
INSERT INTO avatar value ('Vampire.png');
INSERT INTO avatar value ('Witch.png');
";
$CREATE_SQL="INSERT IGNORE INTO avatar value ('256_10.png'),('256_11.png'),('256_12.png'),('256_13.png'),('256_14.png'),
('256_15.png'),('256_16.png'), ('256_1.png'), ('256_2.png'), ('256_3.png'), ('256_4.png'), ('256_5.png'), ('256_6.png'),
('256_7.png'), ('256_8.png'), ('256_9.png'), ('avatar-1.png'), ('avatar-2.png'), ('avatar-3.png'), ('avatar-4.png'), ('avatar-5.png'),
('avatar-6.png'), ('avatar-7.png'), ('avatar-8.png'), ('Bride.png'), ('default.png'), ('Franky.png'),
('Skeleton.png'), ('users-10.svg'), ('users-11.svg'), ('users-12.svg'), ('users-13.svg'), ('users-14.svg'), ('users-15.svg'),
('users-16.svg'), ('users-1.svg'), ('users-2.svg'), ('users-3.svg'), ('users-4.svg'), ('users-5.svg'), ('users-6.svg'),
('users-7.svg'), ('users-8.svg'), ('users-9.svg'), ('Vampire-Girl.png'), ('Vampire.png'), ('Witch.png')";
$this->db->createCommand($CREATE_SQL)->execute();
}

Expand Down
2 changes: 1 addition & 1 deletion backend/migrations-init/m200309_094731_populate_hints.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class m200309_094731_populate_hints extends Migration
*/
public function safeUp()
{
$this->db->createCommand("insert into hint (id,title) values (-1,'Welcome to the gig')")->execute();
$this->upsert("hint",['id'=>-1,'title'=>'Welcome to the gig']);

}

Expand Down
Loading

0 comments on commit 9262ea7

Please sign in to comment.