ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ilWOPIDB90 Class Reference
+ Inheritance diagram for ilWOPIDB90:
+ Collaboration diagram for ilWOPIDB90:

Public Member Functions

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

Private Attributes

ilDBInterface $db = null
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 24 of file class.ilWOPIDB90.php.

Member Function Documentation

◆ prepare()

ilWOPIDB90::prepare ( ilDBInterface  $db)

Definition at line 28 of file class.ilWOPIDB90.php.

References $db.

28  : void
29  {
30  $this->db = $db;
31  }
ilDBInterface $db

◆ step_1()

ilWOPIDB90::step_1 ( )

Definition at line 33 of file class.ilWOPIDB90.php.

33  : void
34  {
35  // create app table
36  $this->db->createTable('wopi_app', [
37  'id' => [
38  'type' => 'integer',
39  'length' => 4,
40  'notnull' => true,
41  ],
42  'name' => [
43  'type' => 'text',
44  'length' => 256,
45  'notnull' => true,
46  ],
47  'favicon' => [
48  'type' => 'text',
49  'length' => 256,
50  'notnull' => false,
51  ],
52  ]);
53  $this->db->addPrimaryKey('wopi_app', ['id']);
54  $this->db->createSequence('wopi_app');
55  }

◆ step_2()

ilWOPIDB90::step_2 ( )

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

57  : void
58  {
59  // create action table
60  $this->db->createTable('wopi_action', [
61  'id' => [
62  'type' => 'integer',
63  'length' => 4,
64  'notnull' => true,
65  ],
66  'app_id' => [
67  'type' => 'integer',
68  'length' => 4,
69  'notnull' => true,
70  ],
71  'name' => [
72  'type' => 'text',
73  'length' => 256,
74  'notnull' => true,
75  ],
76  'ext' => [
77  'type' => 'text',
78  'length' => 256,
79  'notnull' => true,
80  ],
81  'urlsrc' => [
82  'type' => 'text',
83  'length' => 2048,
84  'notnull' => true,
85  ]
86  ]);
87  $this->db->addPrimaryKey('wopi_action', ['id']);
88  $this->db->createSequence('wopi_action');
89  $this->db->addIndex('wopi_action', ['app_id'], 'i1');
90  }

◆ step_3()

ilWOPIDB90::step_3 ( )

Definition at line 92 of file class.ilWOPIDB90.php.

92  : void
93  {
94  if (!$this->db->tableColumnExists('wopi_action', 'url_appendix')) {
95  $this->db->addTableColumn(
96  'wopi_action',
97  'url_appendix',
98  [
99  'type' => 'text',
100  'length' => 4000,
101  'notnull' => false,
102  ]
103  );
104  }
105  }

◆ step_4()

ilWOPIDB90::step_4 ( )

Definition at line 107 of file class.ilWOPIDB90.php.

107  : void
108  {
109  if (!$this->db->tableColumnExists('wopi_action', 'target_ext')) {
110  $this->db->addTableColumn(
111  'wopi_action',
112  'target_ext',
113  [
114  'type' => 'text',
115  'length' => 256,
116  'notnull' => false,
117  ],
118  );
119  }
120  }

Field Documentation

◆ $db

ilDBInterface ilWOPIDB90::$db = null
private

Definition at line 26 of file class.ilWOPIDB90.php.

Referenced by prepare().


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