Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
faq
Commits
70e151a5
Commit
70e151a5
authored
Apr 25, 2017
by
Bertrand Gauthier
Browse files
Abandon vérif schéma.
parent
e8e9d066
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenFaq/Service/FaqService.php
View file @
70e151a5
...
...
@@ -42,13 +42,13 @@ class FaqService implements EntityManagerAwareInterface
*/
public
function
checkSchema
()
{
$tableName
=
$this
->
entityManager
->
getClassMetadata
(
$this
->
faqEntityClass
)
->
getTableName
();
$q
=
"select count(*) from ALL_TABLES where UPPER(TABLE_NAME) = UPPER(:tablename)"
;
$s
=
$this
->
entityManager
->
getConnection
()
->
executeQuery
(
$q
,
[
'tablename'
=>
$tableName
]);
$count
=
(
int
)
$s
->
fetchColumn
(
0
);
if
(
$count
===
0
)
{
throw
new
LogicException
(
"La table
$tableName
est introuvable"
);
}
//
$tableName = $this->entityManager->getClassMetadata($this->faqEntityClass)->getTableName();
//
$q = "select count(*) from ALL_TABLES where UPPER(TABLE_NAME) = UPPER(:tablename)";
//
$s = $this->entityManager->getConnection()->executeQuery($q, ['tablename' => $tableName]);
//
$count = (int) $s->fetchColumn(0);
//
if ($count === 0) {
//
throw new LogicException("La table $tableName est introuvable");
//
}
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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