ILIAS  release_8 Revision v8.24
ilCertificateDatabaseUpdateSteps Class Reference
+ Inheritance diagram for ilCertificateDatabaseUpdateSteps:
+ Collaboration diagram for ilCertificateDatabaseUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file class.ilCertificateDatabaseUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilCertificateDatabaseUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 25 of file class.ilCertificateDatabaseUpdateSteps.php.

25 : void
26 {
27 $this->db = $db;
28 }

References $db.

◆ step_1()

ilCertificateDatabaseUpdateSteps::step_1 ( )

Definition at line 30 of file class.ilCertificateDatabaseUpdateSteps.php.

30 : void
31 {
32 if ($this->db->tableExists('il_cert_template') && $this->db->tableColumnExists('il_cert_template', 'certificate_content_bu')) {
33 $this->db->dropTableColumn('il_cert_template', 'certificate_content_bu');
34 }
35 if ($this->db->tableExists('il_cert_user_cert') && $this->db->tableColumnExists('il_cert_user_cert', 'certificate_content_bu')) {
36 $this->db->dropTableColumn('il_cert_user_cert', 'certificate_content_bu');
37 }
38 }

◆ step_2()

ilCertificateDatabaseUpdateSteps::step_2 ( )

Definition at line 40 of file class.ilCertificateDatabaseUpdateSteps.php.

40 : void
41 {
42 if ($this->db->tableExists('il_cert_template') && $this->db->tableColumnExists('il_cert_template', 'certificate_content_backup')) {
43 $this->db->dropTableColumn('il_cert_template', 'certificate_content_backup');
44 }
45 if ($this->db->tableExists('il_cert_user_cert') && $this->db->tableColumnExists('il_cert_user_cert', 'certificate_content_backup')) {
46 $this->db->dropTableColumn('il_cert_user_cert', 'certificate_content_backup');
47 }
48 }

◆ step_3()

ilCertificateDatabaseUpdateSteps::step_3 ( )

Definition at line 50 of file class.ilCertificateDatabaseUpdateSteps.php.

50 : void
51 {
52 if ($this->db->tableExists('il_cert_bgtask_migr')) {
53 $this->db->dropTable('il_cert_bgtask_migr');
54 }
55 }

◆ step_4()

ilCertificateDatabaseUpdateSteps::step_4 ( )

Definition at line 57 of file class.ilCertificateDatabaseUpdateSteps.php.

57 : void
58 {
59 if ($this->db->tableExists('il_cert_user_cert') && $this->db->tableColumnExists('il_cert_user_cert', 'user_id')) {
60 $this->db->renameTableColumn('il_cert_user_cert', 'user_id', 'usr_id');
61 }
62 }

◆ step_5()

ilCertificateDatabaseUpdateSteps::step_5 ( )

Definition at line 64 of file class.ilCertificateDatabaseUpdateSteps.php.

64 : void
65 {
66 if (
67 $this->db->tableExists('il_cert_template')
68 && !$this->db->indexExistsByFields('il_cert_template', ['background_image_path', 'currently_active'])
69 ) {
70 $this->db->addIndex('il_cert_template', ['background_image_path', 'currently_active'], 'i5');
71 }
72
73 if (
74 $this->db->tableExists('il_cert_user_cert')
75 && !$this->db->indexExistsByFields('il_cert_user_cert', ['background_image_path', 'currently_active'])
76 ) {
77 $this->db->addIndex('il_cert_user_cert', ['background_image_path', 'currently_active'], 'i7');
78 }
79 }

Field Documentation

◆ $db

ilDBInterface ilCertificateDatabaseUpdateSteps::$db
protected

Definition at line 23 of file class.ilCertificateDatabaseUpdateSteps.php.

Referenced by prepare().


The documentation for this class was generated from the following file: