示例#1
0
 /**
  * @param \OCP\IConfig $config
  * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
  */
 public function __construct(IConfig $config, AbstractPlatform $platform)
 {
     $this->platform = $platform;
     $this->DBNAME = $config->getSystemValue('dbname', 'owncloud');
     $this->DBTABLEPREFIX = $config->getSystemValue('dbtableprefix', 'oc_');
     // Oracle does not support longer index names then 30 characters.
     // We use this limit for all DBs to make sure it does not cause a
     // problem.
     $this->schemaConfig = new SchemaConfig();
     $this->schemaConfig->setMaxIdentifierLength(30);
 }
示例#2
0
 /**
  * Create the configuration for this schema.
  *
  * @return SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     return $schemaConfig;
 }
 /**
  * Creates the configuration for this schema.
  *
  * @return \Doctrine\DBAL\Schema\SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     $searchPaths = $this->getSchemaSearchPaths();
     if (isset($searchPaths[0])) {
         $schemaConfig->setName($searchPaths[0]);
     }
     $params = $this->_conn->getParams();
     if (isset($params['defaultTableOptions'])) {
         $schemaConfig->setDefaultTableOptions($params['defaultTableOptions']);
     }
     return $schemaConfig;
 }
 /**
  * Create the configuration for this schema.
  *
  * @return SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setExplicitForeignKeyIndexes($this->_platform->createsExplicitIndexForForeignKeys());
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     return $schemaConfig;
 }
 /**
  * Create the configuration for this schema.
  *
  * @return SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     $searchPaths = $this->getSchemaSearchPaths();
     if (isset($searchPaths[0])) {
         $schemaConfig->setName($searchPaths[0]);
     }
     return $schemaConfig;
 }