MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
SchemaException.php
Ir para a documentação deste ficheiro.
1
<?php
2
3
namespace
Doctrine\DBAL\Schema
;
4
5
class
SchemaException
extends
\Doctrine\DBAL\DBALException
6
{
7
const
TABLE_DOESNT_EXIST
= 10;
8
const
TABLE_ALREADY_EXISTS
= 20;
9
const
COLUMN_DOESNT_EXIST
= 30;
10
const
COLUMN_ALREADY_EXISTS
= 40;
11
const
INDEX_DOESNT_EXIST
= 50;
12
const
INDEX_ALREADY_EXISTS
= 60;
13
const
SEQUENCE_DOENST_EXIST
= 70;
14
const
SEQUENCE_ALREADY_EXISTS
= 80;
15
const
INDEX_INVALID_NAME
= 90;
16
const
FOREIGNKEY_DOESNT_EXIST
= 100;
17
22
static
public
function
tableDoesNotExist
($tableName)
23
{
24
return
new
self
(
"There is no table with name '"
.$tableName.
"' in the schema."
,
self::TABLE_DOESNT_EXIST
);
25
}
26
31
static
public
function
indexNameInvalid
($indexName)
32
{
33
return
new
self
(
"Invalid index-name $indexName given, has to be [a-zA-Z0-9_]"
,
self::INDEX_INVALID_NAME
);
34
}
35
40
static
public
function
indexDoesNotExist
($indexName, $table)
41
{
42
return
new
self
(
"Index '$indexName' does not exist on table '$table'."
,
self::INDEX_DOESNT_EXIST
);
43
}
44
49
static
public
function
indexAlreadyExists
($indexName, $table)
50
{
51
return
new
self
(
"An index with name '$indexName' was already defined on table '$table'."
,
self::INDEX_ALREADY_EXISTS
);
52
}
53
58
static
public
function
columnDoesNotExist
($columnName, $table)
59
{
60
return
new
self
(
"There is no column with name '$columnName' on table '$table'."
,
self::COLUMN_DOESNT_EXIST
);
61
}
62
68
static
public
function
tableAlreadyExists
($tableName)
69
{
70
return
new
self
(
"The table with name '"
.$tableName.
"' already exists."
,
self::TABLE_ALREADY_EXISTS
);
71
}
72
79
static
public
function
columnAlreadyExists
($tableName, $columnName)
80
{
81
return
new
self
(
82
"The column '"
.$columnName.
"' on table '"
.$tableName.
"' already exists."
,
self::COLUMN_ALREADY_EXISTS
83
);
84
}
85
90
static
public
function
sequenceAlreadyExists
($sequenceName)
91
{
92
return
new
self
(
"The sequence '"
.$sequenceName.
"' already exists."
,
self::SEQUENCE_ALREADY_EXISTS
);
93
}
94
99
static
public
function
sequenceDoesNotExist
($sequenceName)
100
{
101
return
new
self
(
"There exists no sequence with the name '"
.$sequenceName.
"'."
,
self::SEQUENCE_DOENST_EXIST
);
102
}
103
108
static
public
function
foreignKeyDoesNotExist
($fkName, $table)
109
{
110
return
new
self
(
"There exists no foreign key with the name '$fkName' on table '$table'."
,
self::FOREIGNKEY_DOESNT_EXIST
);
111
}
112
113
static
public
function
namedForeignKeyRequired
(
Table
$localTable,
ForeignKeyConstraint
$foreignKey)
114
{
115
return
new
self
(
116
"The performed schema operation on "
.$localTable->getName().
" requires a named foreign key, "
.
117
"but the given foreign key from ("
.implode(
", "
, $foreignKey->
getColumns
()).
") onto foreign table "
.
118
"'"
.$foreignKey->getForeignTableName().
"' ("
.implode(
", "
, $foreignKey->
getForeignColumns
()).
") is currently "
.
119
"unnamed."
120
);
121
}
122
123
static
public
function
alterTableChangeNotSupported
($changeName) {
124
return
new
self
(
"Alter table change not supported, given '$changeName'"
);
125
}
126
}
Doctrine\DBAL\DBALException
Definição
DBALException.php:6
Doctrine\DBAL\Schema\ForeignKeyConstraint
Definição
ForeignKeyConstraint.php:27
Doctrine\DBAL\Schema\ForeignKeyConstraint\getColumns
getColumns()
Definição
ForeignKeyConstraint.php:99
Doctrine\DBAL\Schema\ForeignKeyConstraint\getForeignColumns
getForeignColumns()
Definição
ForeignKeyConstraint.php:115
Doctrine\DBAL\Schema\SchemaException
Definição
SchemaException.php:6
Doctrine\DBAL\Schema\SchemaException\tableAlreadyExists
static tableAlreadyExists($tableName)
Definição
SchemaException.php:68
Doctrine\DBAL\Schema\SchemaException\indexAlreadyExists
static indexAlreadyExists($indexName, $table)
Definição
SchemaException.php:49
Doctrine\DBAL\Schema\SchemaException\SEQUENCE_DOENST_EXIST
const SEQUENCE_DOENST_EXIST
Definição
SchemaException.php:13
Doctrine\DBAL\Schema\SchemaException\FOREIGNKEY_DOESNT_EXIST
const FOREIGNKEY_DOESNT_EXIST
Definição
SchemaException.php:16
Doctrine\DBAL\Schema\SchemaException\COLUMN_ALREADY_EXISTS
const COLUMN_ALREADY_EXISTS
Definição
SchemaException.php:10
Doctrine\DBAL\Schema\SchemaException\INDEX_ALREADY_EXISTS
const INDEX_ALREADY_EXISTS
Definição
SchemaException.php:12
Doctrine\DBAL\Schema\SchemaException\sequenceDoesNotExist
static sequenceDoesNotExist($sequenceName)
Definição
SchemaException.php:99
Doctrine\DBAL\Schema\SchemaException\TABLE_ALREADY_EXISTS
const TABLE_ALREADY_EXISTS
Definição
SchemaException.php:8
Doctrine\DBAL\Schema\SchemaException\SEQUENCE_ALREADY_EXISTS
const SEQUENCE_ALREADY_EXISTS
Definição
SchemaException.php:14
Doctrine\DBAL\Schema\SchemaException\INDEX_INVALID_NAME
const INDEX_INVALID_NAME
Definição
SchemaException.php:15
Doctrine\DBAL\Schema\SchemaException\indexNameInvalid
static indexNameInvalid($indexName)
Definição
SchemaException.php:31
Doctrine\DBAL\Schema\SchemaException\columnAlreadyExists
static columnAlreadyExists($tableName, $columnName)
Definição
SchemaException.php:79
Doctrine\DBAL\Schema\SchemaException\columnDoesNotExist
static columnDoesNotExist($columnName, $table)
Definição
SchemaException.php:58
Doctrine\DBAL\Schema\SchemaException\namedForeignKeyRequired
static namedForeignKeyRequired(Table $localTable, ForeignKeyConstraint $foreignKey)
Definição
SchemaException.php:113
Doctrine\DBAL\Schema\SchemaException\indexDoesNotExist
static indexDoesNotExist($indexName, $table)
Definição
SchemaException.php:40
Doctrine\DBAL\Schema\SchemaException\foreignKeyDoesNotExist
static foreignKeyDoesNotExist($fkName, $table)
Definição
SchemaException.php:108
Doctrine\DBAL\Schema\SchemaException\sequenceAlreadyExists
static sequenceAlreadyExists($sequenceName)
Definição
SchemaException.php:90
Doctrine\DBAL\Schema\SchemaException\INDEX_DOESNT_EXIST
const INDEX_DOESNT_EXIST
Definição
SchemaException.php:11
Doctrine\DBAL\Schema\SchemaException\alterTableChangeNotSupported
static alterTableChangeNotSupported($changeName)
Definição
SchemaException.php:123
Doctrine\DBAL\Schema\SchemaException\COLUMN_DOESNT_EXIST
const COLUMN_DOESNT_EXIST
Definição
SchemaException.php:9
Doctrine\DBAL\Schema\SchemaException\TABLE_DOESNT_EXIST
const TABLE_DOESNT_EXIST
Definição
SchemaException.php:7
Doctrine\DBAL\Schema\SchemaException\tableDoesNotExist
static tableDoesNotExist($tableName)
Definição
SchemaException.php:22
Doctrine\DBAL\Schema\Table
Definição
Table.php:38
Doctrine\DBAL\Schema
Definição
AbstractAsset.php:22
classes
extensions
doctrine-dbal
Doctrine
DBAL
Schema
SchemaException.php
Gerado por
1.10.0