ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilCertificateDatabaseUpdateSteps11 Class Reference
+ Inheritance diagram for ilCertificateDatabaseUpdateSteps11:
+ Collaboration diagram for ilCertificateDatabaseUpdateSteps11:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
- 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 ilCertificateDatabaseUpdateSteps11.php.

Member Function Documentation

◆ prepare()

ilCertificateDatabaseUpdateSteps11::prepare ( ilDBInterface  $db)

Definition at line 25 of file ilCertificateDatabaseUpdateSteps11.php.

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

References $db.

◆ step_1()

ilCertificateDatabaseUpdateSteps11::step_1 ( )

Definition at line 30 of file ilCertificateDatabaseUpdateSteps11.php.

30 : void
31 {
32 if ($this->db->tableExists('il_cert_user_cert') &&
33 $this->db->tableColumnExists('il_cert_user_cert', 'thumbnail_image_path')) {
34 $this->db->renameTableColumn(
35 'il_cert_user_cert',
36 'thumbnail_image_path',
37 'tile_image_path'
38 );
39 }
40 if ($this->db->tableExists('il_cert_template') &&
41 $this->db->tableColumnExists('il_cert_template', 'thumbnail_image_path')) {
42 $this->db->renameTableColumn(
43 'il_cert_template',
44 'thumbnail_image_path',
45 'tile_image_path'
46 );
47 }
48
49 if ($this->db->tableExists('il_cert_user_cert') &&
50 $this->db->tableColumnExists('il_cert_user_cert', 'thumbnail_image_ident')) {
51 $this->db->renameTableColumn(
52 'il_cert_user_cert',
53 'thumbnail_image_ident',
54 'tile_image_ident'
55 );
56 }
57 if ($this->db->tableExists('il_cert_template') &&
58 $this->db->tableColumnExists('il_cert_template', 'thumbnail_image_ident')) {
59 $this->db->renameTableColumn(
60 'il_cert_template',
61 'thumbnail_image_ident',
62 'tile_image_ident'
63 );
64 }
65 }

◆ step_2()

ilCertificateDatabaseUpdateSteps11::step_2 ( )

Definition at line 67 of file ilCertificateDatabaseUpdateSteps11.php.

67 : void
68 {
69 if (
70 $this->db->tableExists('il_cert_user_cert')
71 ) {
72 if (
73 $this->db->tableColumnExists('il_cert_user_cert', 'background_image_path')
74 ) {
75 $this->db->dropTableColumn('il_cert_user_cert', 'background_image_path');
76 }
77 if (
78 $this->db->tableColumnExists('il_cert_user_cert', 'thumbnail_image_path')
79 ) {
80 $this->db->dropTableColumn('il_cert_user_cert', 'thumbnail_image_path');
81 }
82 }
83
84 if (
85 $this->db->tableExists('il_cert_template')
86 ) {
87 if (
88 $this->db->tableColumnExists('il_cert_template', 'background_image_path')
89 ) {
90 $this->db->dropTableColumn('il_cert_template', 'background_image_path');
91 }
92 if (
93 $this->db->tableColumnExists('il_cert_template', 'thumbnail_image_path')
94 ) {
95 $this->db->dropTableColumn('il_cert_template', 'thumbnail_image_path');
96 }
97 }
98 }

Field Documentation

◆ $db

ilDBInterface ilCertificateDatabaseUpdateSteps11::$db
protected

Definition at line 23 of file ilCertificateDatabaseUpdateSteps11.php.

Referenced by prepare().


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