* @author Robin Appelman * @author Thomas Müller * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ namespace OC\DB; use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\Schema; class OracleMigrator extends NoCheckMigrator { /** * @param Schema $targetSchema * @param \Doctrine\DBAL\Connection $connection * @return \Doctrine\DBAL\Schema\SchemaDiff */ protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { $schemaDiff = parent::getDiff($targetSchema, $connection); // oracle forces us to quote the identifiers foreach ($schemaDiff->changedTables as $tableDiff) { $tableDiff->name = $this->connection->quoteIdentifier($tableDiff->name); foreach ($tableDiff->changedColumns as $column) { $column->oldColumnName = $this->connection->quoteIdentifier($column->oldColumnName); // auto increment is not relevant for oracle and can anyhow not be applied on change $column->changedProperties = array_diff($column->changedProperties, ['autoincrement', 'unsigned']); } $tableDiff->changedColumns = array_filter($tableDiff->changedColumns, function (ColumnDiff $column) { return count($column->changedProperties) > 0; }); } return $schemaDiff; } /** * @param string $name * @return string */ protected function generateTemporaryTableName($name) { return 'oc_' . uniqid(); } /** * @param $statement * @return string */ protected function convertStatementToScript($statement) { if (substr($statement, -1) === ';') { return $statement . PHP_EOL . '/' . PHP_EOL; } $script = $statement . ';'; $script .= PHP_EOL; $script .= PHP_EOL; return $script; } protected function getFilterExpression() { return '/^"' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; } } tion value='add-default-request-timeout-const'>add-default-request-timeout-const Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: fc3848d8cdb092e7549feff0bf34b6578e9ce2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="utf-8" ?>
<!--
 - SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.
 - SPDX-License-Identifier: AGPL-3.0-only
-->
<phpunit bootstrap="bootstrap.php"
		 verbose="true"
		 timeoutForSmallTests="900"
		 timeoutForMediumTests="900"
		 timeoutForLargeTests="900"
>
	<testsuite name='ownCloud files external'>
		<directory suffix=".php">../apps/files_external/tests</directory>
		<!-- exclude backends as they are called separately -->
		<exclude>../apps/files_external/tests/Storage/</exclude>
	</testsuite>
	<!-- filters for code coverage -->
	<filter>
		<!-- whitelist processUncoveredFilesFromWhitelist="true" -->
		<whitelist>
			<file>../lib/private/Files/Storage/DAV.php</file>
			<directory suffix=".php">../apps/files_external</directory>
			<exclude>
				<directory suffix=".php">../apps/files_external/l10n</directory>
				<directory suffix=".php">../apps/files_external/3rdparty</directory>
				<directory suffix=".php">../apps/files_external/tests</directory>
			</exclude>
		</whitelist>
	</filter>
	<!--<listeners>
		<listener class="StartSessionListener" file="startsessionlistener.php" />
	  <listener class="TestCleanupListener" file="testcleanuplistener.php">
		<arguments>
			<string>detail</string>
		</arguments>
	  </listener>
	</listeners>-->
</phpunit>