ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilForumDatabaseUpdateSteps Class Reference
+ Inheritance diagram for ilForumDatabaseUpdateSteps:
+ Collaboration diagram for ilForumDatabaseUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
- 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.ilForumDatabaseUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilForumDatabaseUpdateSteps::prepare ( ilDBInterface  $db)

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

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

References $db.

◆ step_1()

ilForumDatabaseUpdateSteps::step_1 ( )

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

30 : void
31 {
32 if ($this->db->tableExists('frm_settings') && !$this->db->tableColumnExists('frm_settings', 'stylesheet')) {
33 $this->db->addTableColumn(
34 'frm_settings',
35 'stylesheet',
36 [
37 'type' => 'integer',
38 'notnull' => true,
39 'length' => 4,
40 'default' => 0
41 ]
42 );
43 }
44 }

◆ step_2()

ilForumDatabaseUpdateSteps::step_2 ( )

Definition at line 46 of file class.ilForumDatabaseUpdateSteps.php.

46 : void
47 {
48 $this->db->manipulateF("UPDATE object_data SET offline = %s WHERE type = %s", ['integer', 'text'], [0, 'frm']);
49 }

◆ step_3()

ilForumDatabaseUpdateSteps::step_3 ( )

Definition at line 51 of file class.ilForumDatabaseUpdateSteps.php.

51 : void
52 {
53 if (!$this->db->tableColumnExists('frm_posts', 'rcid')) {
54 $this->db->addTableColumn(
55 'frm_posts',
56 'rcid',
57 [
58 'type' => 'text',
59 'notnull' => false,
60 'length' => 64,
61 'default' => ''
62 ]
63 );
64 }
65 }

◆ step_4()

ilForumDatabaseUpdateSteps::step_4 ( )

Definition at line 67 of file class.ilForumDatabaseUpdateSteps.php.

67 : void
68 {
69 if ($this->db->tableExists('frm_thread_access')) {
70 $this->db->dropTable('frm_thread_access');
71 }
72 }

◆ step_5()

ilForumDatabaseUpdateSteps::step_5 ( )

Definition at line 74 of file class.ilForumDatabaseUpdateSteps.php.

74 : void
75 {
76 if ($this->db->tableExists('settings')) {
77 $this->db->manipulateF(
78 "DELETE FROM settings WHERE keyword = %s",
79 ['text'],
80 ['frm_new_deadline']
81 );
82 }
83 }

◆ step_6()

ilForumDatabaseUpdateSteps::step_6 ( )

Definition at line 85 of file class.ilForumDatabaseUpdateSteps.php.

85 : void
86 {
87 if (!$this->db->tableColumnExists('frm_posts_drafts', 'rcid')) {
88 $this->db->addTableColumn(
89 'frm_posts_drafts',
90 'rcid',
91 [
92 'type' => 'text',
93 'notnull' => false,
94 'length' => 64,
95 'default' => ''
96 ]
97 );
98 }
99 }

Field Documentation

◆ $db

ilDBInterface ilForumDatabaseUpdateSteps::$db
protected

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

Referenced by prepare().


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