Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ table name contains a dot or other special characters, it should be quoted.

Passing names that are not valid SQL to the schema introspection methods is also deprecated.

## Platform and schema manager methods marked as internal

The following platform and schema manager methods are considered implementation details and have been marked as
internal:

- `OraclePlatform::getCreateAutoincrementSql()`
- `OraclePlatform::getIdentitySequenceName()`
- `OracleSchemaManager::dropAutoincrement()`
- `SQLServerPlatform::getCreateColumnCommentSQL()`
- `SQLServerPlatform::getDefaultConstraintDeclarationSQL()`
- `SQLServerPlatform::getAlterColumnCommentSQL()`
- `SQLServerPlatform::getDropColumnCommentSQL()`
- `SQLServerPlatform::getAddExtendedPropertySQL()`
- `SQLServerPlatform::getDropExtendedPropertySQL()`
- `SQLServerPlatform::getUpdateExtendedPropertySQL()`

## Deprecated `AbstractSchemaManager::_normalizeName()`

The `AbstractSchemaManager::_normalizeName()` method has been deprecated. Use `Identifier::toNormalizedValue()` to
Expand Down
7 changes: 6 additions & 1 deletion src/Platforms/OraclePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,11 @@ public function getListViewsSQL(string $database): string
return 'SELECT view_name, text FROM sys.user_views';
}

/** @return array<int, string> */
/**
* @internal The method should be only used by the {@see OraclePlatform} class.
*
* @return array<int, string>
*/
protected function getCreateAutoincrementSql(string $name, string $table, int $start = 1): array
{
$tableIdentifier = $this->normalizeIdentifier($table);
Expand Down Expand Up @@ -684,6 +688,7 @@ protected function getRenameIndexSQL(string $oldIndexName, Index $index, string
return ['ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)];
}

/** @internal The method should be only used by the {@see OraclePlatform} class. */
protected function getIdentitySequenceName(string $tableName): string
{
$table = new Identifier($tableName);
Expand Down
14 changes: 14 additions & 0 deletions src/Platforms/SQLServerPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ private function unquoteSingleIdentifier(string $possiblyQuotedName): string
* as column comments are stored in the same property there when
* specifying a column's "Description" attribute.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @param string $tableName The quoted table name to which the column belongs.
* @param string $columnName The quoted column name to create the comment for.
* @param string $comment The column's comment.
Expand Down Expand Up @@ -306,6 +308,8 @@ protected function getCreateColumnCommentSQL(string $tableName, string $columnNa
/**
* Returns the SQL snippet for declaring a default constraint.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @param mixed[] $column Column definition.
*/
protected function getDefaultConstraintDeclarationSQL(array $column): string
Expand Down Expand Up @@ -568,6 +572,8 @@ private function alterColumnRequiresDropDefaultConstraint(ColumnDiff $columnDiff
* as column comments are stored in the same property there when
* specifying a column's "Description" attribute.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @param string $tableName The quoted table name to which the column belongs.
* @param string $columnName The quoted column name to alter the comment for.
* @param string $comment The column's comment.
Expand Down Expand Up @@ -603,6 +609,8 @@ protected function getAlterColumnCommentSQL(string $tableName, string $columnNam
* as column comments are stored in the same property there when
* specifying a column's "Description" attribute.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @param string $tableName The quoted table name to which the column belongs.
* @param string $columnName The quoted column name to drop the comment for.
*/
Expand Down Expand Up @@ -661,6 +669,8 @@ private function getRenameSQL(string ...$arguments): string
/**
* Returns the SQL statement for adding an extended property to a database object.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @link http://msdn.microsoft.com/en-us/library/ms180047%28v=sql.90%29.aspx
*
* @param string $name The name of the property to add.
Expand Down Expand Up @@ -695,6 +705,8 @@ protected function getAddExtendedPropertySQL(
/**
* Returns the SQL statement for dropping an extended property from a database object.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @link http://technet.microsoft.com/en-gb/library/ms178595%28v=sql.90%29.aspx
*
* @param string $name The name of the property to drop.
Expand Down Expand Up @@ -727,6 +739,8 @@ protected function getDropExtendedPropertySQL(
/**
* Returns the SQL statement for updating an extended property of a database object.
*
* @internal The method should be only used by the {@see SQLServerPlatform} class.
*
* @link http://msdn.microsoft.com/en-us/library/ms186885%28v=sql.90%29.aspx
*
* @param string $name The name of the property to update.
Expand Down
6 changes: 5 additions & 1 deletion src/Schema/OracleSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ public function createDatabase(string $database): void
$this->connection->executeStatement($statement);
}

/** @throws Exception */
/**
* @internal The method should be only used by the {@see OracleSchemaManager} class.
*
* @throws Exception
*/
protected function dropAutoincrement(string $table): bool
{
$sql = $this->platform->getDropAutoincrementSql($table);
Expand Down
Loading