original_string: protected function applyDatabaseScript($code, $version, $script)
      {
          /*
           * Execute the database PHP script
           */
          $updateFile = $this->pluginManager->getPluginPath($code) . '/updates/' . $script;
  
          if (!File::isFile($updateFile)) {
              $this->note('- <error>v' . $version . ':  Migration file "' . $script . '" not found</error>');
          }
  
          $this->updater->setUp($updateFile);
  
          Db::table('system_plugin_history')->insert([
              'code' => $code,
              'type' => self::HISTORY_TYPE_SCRIPT,
              'version' => $version,
              'detail' => $script,
              'created_at' => new Carbon
          ]);
      }
code: protected function applyDatabaseScript($code, $version, $script)
      {
          /*
           * Execute the database PHP script
           */
          $updateFile = $this->pluginManager->getPluginPath($code) . '/updates/' . $script;
  
          if (!File::isFile($updateFile)) {
              $this->note('- <error>v' . $version . ':  Migration file "' . $script . '" not found</error>');
          }
  
          $this->updater->setUp($updateFile);
  
          Db::table('system_plugin_history')->insert([
              'code' => $code,
              'type' => self::HISTORY_TYPE_SCRIPT,
              'version' => $version,
              'detail' => $script,
              'created_at' => new Carbon
          ]);
      }
code_tokens: protected function applyDatabaseScript ( $ code , $ version , $ script ) { /*
           * Execute the database PHP script
           */ $ updateFile = $ this -> pluginManager -> getPluginPath ( $ code ) . '/updates/' . $ script ; if ( ! File :: isFile ( $ updateFile ) ) { $ this -> note ( '- <error>v' . $ version . ':  Migration file "' . $ script . '" not found</error>' ) ; } $ this -> updater -> setUp ( $ updateFile ) ; Db :: table ( 'system_plugin_history' ) -> insert ( [ 'code' => $ code , 'type' => self :: HISTORY_TYPE_SCRIPT , 'version' => $ version , 'detail' => $ script , 'created_at' => new Carbon ] ) ; }
docstring: Registers a database update script in the history table.
docstring_tokens: Registers a database update script in the history table .