19 declare(strict_types=1);
23 protected \ilDBInterface
$db;
32 if ($this->db->sequenceExists(
'skl_self_eval')) {
33 $this->db->dropSequence(
'skl_self_eval');
36 if ($this->db->tableExists(
'skl_self_eval')) {
37 $this->db->dropTable(
'skl_self_eval');
40 if ($this->db->tableExists(
'skl_self_eval_level')) {
41 $this->db->dropTable(
'skl_self_eval_level');
47 if (!$this->db->tableColumnExists(
'skl_user_skill_level',
'trigger_user_id')) {
48 $this->db->addTableColumn(
49 'skl_user_skill_level',
63 if (!$this->db->tableColumnExists(
'skl_user_has_level',
'trigger_user_id')) {
64 $this->db->addTableColumn(
92 "title" => [
"text",
"Default"],
93 "description" => [
"text",
""]
96 "type" => [
"text",
"skee"],
97 "title" => [
"text",
"Skill Tree"]
104 $set = $this->db->queryF(
105 "SELECT * FROM object_data " .
106 " WHERE type = %s AND title = %s",
107 [
"string",
"string"],
110 $rec = $this->db->fetchAssoc($set);
115 "skl_tree_id" => [
"integer", $rec[
"obj_id"]]
118 "skl_tree_id" => [
"integer", 1]
125 if (!$this->db->tableColumnExists(
"skl_profile",
"skill_tree_id")) {
126 $this->db->addTableColumn(
"skl_profile",
"skill_tree_id", array(
137 $set = $this->db->queryF(
138 "SELECT * FROM object_data " .
139 " WHERE type = %s AND title = %s",
140 [
"string",
"string"],
143 $rec = $this->db->fetchAssoc($set);
148 "skill_tree_id" => [
"integer", $rec[
"obj_id"]]
151 "skill_tree_id" => [
"integer", 0]
158 if (!$this->db->tableColumnExists(
"skl_profile",
"image_id")) {
159 $this->db->addTableColumn(
"skl_profile",
"image_id", array(
169 if (!$this->db->tableExists(
"skl_profile_completion")) {
182 "type" =>
"timestamp",
191 $this->db->createTable(
"skl_profile_completion", $fields);
192 $this->db->addPrimaryKey(
"skl_profile_completion", [
"profile_id",
"user_id",
"date"]);
prepare(\ilDBInterface $db)
Prepare the execution of the steps.