Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
d9f05fa9
Unverified
Commit
d9f05fa9
authored
Jul 09, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing exception annotation to the schema classes
parent
15bec73c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
0 deletions
+47
-0
Column.php
src/Schema/Column.php
+4
-0
Comparator.php
src/Schema/Comparator.php
+6
-0
Schema.php
src/Schema/Schema.php
+14
-0
Table.php
src/Schema/Table.php
+18
-0
Visitor.php
src/Schema/Visitor/Visitor.php
+5
-0
No files found.
src/Schema/Column.php
View file @
d9f05fa9
...
...
@@ -58,6 +58,8 @@ class Column extends AbstractAsset
*
* @param string $columnName
* @param mixed[] $options
*
* @throws SchemaException
*/
public
function
__construct
(
$columnName
,
Type
$type
,
array
$options
=
[])
{
...
...
@@ -70,6 +72,8 @@ class Column extends AbstractAsset
* @param mixed[] $options
*
* @return Column
*
* @throws SchemaException
*/
public
function
setOptions
(
array
$options
)
{
...
...
src/Schema/Comparator.php
View file @
d9f05fa9
...
...
@@ -22,6 +22,8 @@ class Comparator
{
/**
* @return SchemaDiff
*
* @throws SchemaException
*/
public
static
function
compareSchemas
(
Schema
$fromSchema
,
Schema
$toSchema
)
{
...
...
@@ -38,6 +40,8 @@ class Comparator
* stored in $toSchema.
*
* @return SchemaDiff
*
* @throws SchemaException
*/
public
function
compare
(
Schema
$fromSchema
,
Schema
$toSchema
)
{
...
...
@@ -188,6 +192,8 @@ class Comparator
* If there are no differences this method returns the boolean false.
*
* @return TableDiff|false
*
* @throws SchemaException
*/
public
function
diffTable
(
Table
$table1
,
Table
$table2
)
{
...
...
src/Schema/Schema.php
View file @
d9f05fa9
...
...
@@ -58,6 +58,8 @@ class Schema extends AbstractAsset
* @param Table[] $tables
* @param Sequence[] $sequences
* @param string[] $namespaces
*
* @throws SchemaException
*/
public
function
__construct
(
array
$tables
=
[],
...
...
@@ -316,6 +318,8 @@ class Schema extends AbstractAsset
* @param string $tableName
*
* @return Table
*
* @throws SchemaException
*/
public
function
createTable
(
$tableName
)
{
...
...
@@ -336,6 +340,8 @@ class Schema extends AbstractAsset
* @param string $newTableName
*
* @return Schema
*
* @throws SchemaException
*/
public
function
renameTable
(
$oldTableName
,
$newTableName
)
{
...
...
@@ -354,6 +360,8 @@ class Schema extends AbstractAsset
* @param string $tableName
*
* @return Schema
*
* @throws SchemaException
*/
public
function
dropTable
(
$tableName
)
{
...
...
@@ -372,6 +380,8 @@ class Schema extends AbstractAsset
* @param int $initialValue
*
* @return Sequence
*
* @throws SchemaException
*/
public
function
createSequence
(
$sequenceName
,
$allocationSize
=
1
,
$initialValue
=
1
)
{
...
...
@@ -422,6 +432,8 @@ class Schema extends AbstractAsset
/**
* @return string[]
*
* @throws SchemaException
*/
public
function
getMigrateToSql
(
Schema
$toSchema
,
AbstractPlatform
$platform
)
{
...
...
@@ -433,6 +445,8 @@ class Schema extends AbstractAsset
/**
* @return string[]
*
* @throws SchemaException
*/
public
function
getMigrateFromSql
(
Schema
$fromSchema
,
AbstractPlatform
$platform
)
{
...
...
src/Schema/Table.php
View file @
d9f05fa9
...
...
@@ -104,6 +104,8 @@ class Table extends AbstractAsset
* @param string|false $indexName
*
* @return self
*
* @throws SchemaException
*/
public
function
setPrimaryKey
(
array
$columnNames
,
$indexName
=
false
)
{
...
...
@@ -128,6 +130,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return self
*
* @throws SchemaException
*/
public
function
addIndex
(
array
$columnNames
,
$indexName
=
null
,
array
$flags
=
[],
array
$options
=
[])
{
...
...
@@ -146,6 +150,8 @@ class Table extends AbstractAsset
* Drops the primary key from this table.
*
* @return void
*
* @throws SchemaException
*/
public
function
dropPrimaryKey
()
{
...
...
@@ -182,6 +188,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return self
*
* @throws SchemaException
*/
public
function
addUniqueIndex
(
array
$columnNames
,
$indexName
=
null
,
array
$options
=
[])
{
...
...
@@ -293,6 +301,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return Column
*
* @throws SchemaException
*/
public
function
addColumn
(
$columnName
,
$typeName
,
array
$options
=
[])
{
...
...
@@ -310,6 +320,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return self
*
* @throws SchemaException
*/
public
function
changeColumn
(
$columnName
,
array
$options
)
{
...
...
@@ -346,6 +358,8 @@ class Table extends AbstractAsset
* @param string|null $name
*
* @return self
*
* @throws SchemaException
*/
public
function
addForeignKeyConstraint
(
$foreignTable
,
array
$localColumnNames
,
array
$foreignColumnNames
,
array
$options
=
[],
$name
=
null
)
{
...
...
@@ -452,6 +466,8 @@ class Table extends AbstractAsset
/**
* @return void
*
* @throws SchemaException
*/
protected
function
_addForeignKeyConstraint
(
ForeignKeyConstraint
$constraint
)
{
...
...
@@ -745,6 +761,8 @@ class Table extends AbstractAsset
/**
* @return void
*
* @throws SchemaException
*/
public
function
visit
(
Visitor
$visitor
)
{
...
...
src/Schema/Visitor/Visitor.php
View file @
d9f05fa9
...
...
@@ -6,6 +6,7 @@ use Doctrine\DBAL\Schema\Column;
use
Doctrine\DBAL\Schema\ForeignKeyConstraint
;
use
Doctrine\DBAL\Schema\Index
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\DBAL\Schema\SchemaException
;
use
Doctrine\DBAL\Schema\Sequence
;
use
Doctrine\DBAL\Schema\Table
;
...
...
@@ -16,6 +17,8 @@ interface Visitor
{
/**
* @return void
*
* @throws SchemaException
*/
public
function
acceptSchema
(
Schema
$schema
);
...
...
@@ -31,6 +34,8 @@ interface Visitor
/**
* @return void
*
* @throws SchemaException
*/
public
function
acceptForeignKey
(
Table
$localTable
,
ForeignKeyConstraint
$fkConstraint
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment