This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.  
 More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilResourceStorageDB80 
- Author
 - Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s.ch 
 
Definition at line 23 of file class.ilResourceStorageDB80.php.
 
◆ prepare()
◆ step_1()
      
        
          | ilResourceStorageDB80::step_1  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 32 of file class.ilResourceStorageDB80.php.
   34         if (!$this->db->tableExists(
'il_resource_stkh_u') && $this->db->tableExists(
'il_resource_stakeh')) {
    35             $this->db->renameTable(
'il_resource_stakeh', 
'il_resource_stkh_u');
    36             $this->db->createTable(
    39                     'id' => [
'type' => 
'text', 
'length' => 32, 
'notnull' => 
true, 
'default' => 
''],
    40                     'class_name' => [
'type' => 
'text', 
'length' => 250, 
'notnull' => 
true, 
'default' => 
''],
    43             $this->db->addPrimaryKey(
'il_resource_stkh', [
'id']);
    44             $this->db->manipulate(
    45                 "INSERT INTO il_resource_stkh (id, class_name) SELECT DISTINCT stakeholder_id, stakeholder_class FROM il_resource_stkh_u;"    49         if ($this->db->tableColumnExists(
'il_resource_stkh_u', 
'stakeholder_class')) {
    50             $this->db->dropTableColumn(
'il_resource_stkh_u', 
'stakeholder_class');
    52         if ($this->db->tableColumnExists(
'il_resource_stkh_u', 
'internal')) {
    53             $this->db->dropTableColumn(
'il_resource_stkh_u', 
'internal');
  
 
 
◆ step_10()
      
        
          | ilResourceStorageDB80::step_10  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 302 of file class.ilResourceStorageDB80.php.
  304         if (!$this->db->primaryExistsByFields(
'il_resource_rca', [
'rcid', 
'rid'])) {
   305             $this->db->addPrimaryKey(
   314         if (!$this->db->primaryExistsByFields(
'il_resource_rc', [
'rcid'])) {
   315             $this->db->addPrimaryKey(
  
 
 
◆ step_11()
      
        
          | ilResourceStorageDB80::step_11  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ step_12()
      
        
          | ilResourceStorageDB80::step_12  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ step_13()
      
        
          | ilResourceStorageDB80::step_13  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 348 of file class.ilResourceStorageDB80.php.
  350         if ($this->db->indexExistsByFields(
'il_resource_stkh_u', [
'stakeholder_id'])) {
   351             $this->db->dropIndexByFields(
'il_resource_stkh_u', [
'stakeholder_id']);
   353         if ($this->db->indexExistsByFields(
'il_resource_stkh_u', [
'rid'])) {
   354             $this->db->dropIndexByFields(
'il_resource_stkh_u', [
'rid']);
   356         if (!$this->db->primaryExistsByFields(
'il_resource_stkh_u', [
'rid', 
'stakeholder_id'])) {
   357             $this->db->addPrimaryKey(
'il_resource_stkh_u', [
'rid', 
'stakeholder_id']);
  
 
 
◆ step_2()
      
        
          | ilResourceStorageDB80::step_2  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 57 of file class.ilResourceStorageDB80.php.
   60         if (!$this->db->tableColumnExists(
'il_resource', 
'rid')) {
    61             $this->db->renameTableColumn(
    67         if (!$this->db->tableColumnExists(
'il_resource_info', 
'rid')) {
    68             $this->db->renameTableColumn(
    74         if (!$this->db->tableColumnExists(
'il_resource_revision', 
'rid')) {
    75             $this->db->renameTableColumn(
    76                 'il_resource_revision',
    81         if (!$this->db->tableColumnExists(
'il_resource_stkh_u', 
'rid')) {
    82             $this->db->renameTableColumn(
  
 
 
◆ step_3()
      
        
          | ilResourceStorageDB80::step_3  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 90 of file class.ilResourceStorageDB80.php.
   98         $this->db->modifyTableColumn(
   103         $this->db->modifyTableColumn(
   108         $this->db->modifyTableColumn(
   109             'il_resource_revision',
   113         $this->db->modifyTableColumn(
   114             'il_resource_stkh_u',
   119             $this->db->modifyTableColumn(
 
 
 
 
◆ step_4()
      
        
          | ilResourceStorageDB80::step_4  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 128 of file class.ilResourceStorageDB80.php.
  130         if (!$this->db->tableColumnExists(
'il_resource_info', 
'version_number')) {
   131             $this->db->addTableColumn(
   140             $this->db->manipulate(
   141                 "UPDATE il_resource_info   142 JOIN il_resource_revision ON il_resource_info.internal = il_resource_revision.internal   143 SET il_resource_info.version_number = il_resource_revision.version_number  
 
 
◆ step_5()
      
        
          | ilResourceStorageDB80::step_5  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 149 of file class.ilResourceStorageDB80.php.
  152         if ($this->db->tableColumnExists(
'il_resource_revision', 
'internal')) {
   153             $this->db->dropTableColumn(
'il_resource_revision', 
'internal');
   154             $this->db->addPrimaryKey(
   155                 'il_resource_revision',
   162         if ($this->db->tableColumnExists(
'il_resource_info', 
'internal')) {
   163             $this->db->dropTableColumn(
'il_resource_info', 
'internal');
   164             $this->db->addPrimaryKey(
   172         if ($this->db->tableColumnExists(
'il_resource_stkh', 
'internal')) {
   173             $this->db->dropTableColumn(
'il_resource_stkh', 
'internal');
   174             $this->db->addPrimaryKey(
  
 
 
◆ step_6()
      
        
          | ilResourceStorageDB80::step_6  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 184 of file class.ilResourceStorageDB80.php.
  192             'il_resource' => [
'storage_id'],
   193             'il_resource_info' => [
'title', 
'size', 
'creation_date'],
   194             'il_resource_revision' => [
'owner_id', 
'title'],
   196         foreach ($table_fields as $table => $fields) {
   197             foreach ($fields as $field) {
   198                 $this->db->modifyTableColumn(
  
 
 
◆ step_7()
      
        
          | ilResourceStorageDB80::step_7  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 207 of file class.ilResourceStorageDB80.php.
  210         if (!$this->db->indexExistsByFields(
'file_data', [
'rid'])) {
   211             $this->db->addIndex(
'file_data', [
'rid'], 
'i1');
  
 
 
◆ step_8()
      
        
          | ilResourceStorageDB80::step_8  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 215 of file class.ilResourceStorageDB80.php.
  218         $this->db->modifyTableColumn(
   219             'il_resource_revision',
   225         $this->db->modifyTableColumn(
   226             'il_resource_stkh_u',
   230         $this->db->modifyTableColumn(
   235         $this->db->modifyTableColumn(
   240         $this->db->modifyTableColumn(
   241             'il_resource_revision',
  
 
 
◆ step_9()
      
        
          | ilResourceStorageDB80::step_9  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 247 of file class.ilResourceStorageDB80.php.
  249         if (!$this->db->tableExists(
'il_resource_rc')) {
   250             $this->db->createTable(
   275         if (!$this->db->tableExists(
'il_resource_rca')) {
   276             $this->db->createTable(
  
 
 
◆ $db
The documentation for this class was generated from the following file: