Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
5fd827b1
Commit
5fd827b1
authored
13 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Make this deal with release 65 schemas.
parent
6c3413e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/IdMapping/Cache.pm
+33
-8
33 additions, 8 deletions
modules/Bio/EnsEMBL/IdMapping/Cache.pm
with
33 additions
and
8 deletions
modules/Bio/EnsEMBL/IdMapping/Cache.pm
+
33
−
8
View file @
5fd827b1
...
...
@@ -791,7 +791,8 @@ sub check_empty_tables {
}
eval
{
my
@tables
=
qw(
my
@tables
=
qw(
gene_stable_id
transcript_stable_id
translation_stable_id
...
...
@@ -804,18 +805,42 @@ sub check_empty_tables {
my
$dba
=
$self
->
get_DBAdaptor
(
$dbtype
);
foreach
my
$table
(
@tables
)
{
if
(
$c
=
$self
->
fetch_value_from_db
(
$dba
,
"
SELECT COUNT(*) FROM
$table
"))
{
$self
->
logger
->
warning
("
$table
table in
$dbtype
db has
$c
entries.
\n
");
$err
++
;
if
(
$table
=~
/^([^_]+)_stable_id/
)
{
$table
=
$
1
;
if
(
$c
=
$self
->
fetch_value_from_db
(
$dba
,
"
SELECT COUNT(*) FROM
$table
WHERE stable_id IS NOT NULL
"
)
)
{
$self
->
logger
->
warning
(
"
$table
table in
$dbtype
db has
$c
stable IDs.
\n
");
$err
++
;
}
}
}
else
{
if
(
$c
=
$self
->
fetch_value_from_db
(
$dba
,
"
SELECT COUNT(*) FROM
$table
"
)
)
{
$self
->
logger
->
warning
(
"
$table
table in
$dbtype
db has
$c
entries.
\n
");
$err
++
;
}
}
}
## end foreach my $table (@tables)
};
if
(
$@
)
{
$self
->
logger
->
warning
("
Error retrieving stable ID and archive table row counts from
$dbtype
db: $@
\n
");
$self
->
logger
->
warning
(
"
Error retrieving stable ID and archive table row counts from
$dbtype
db: $@
\n
"
);
$err
++
;
}
elsif
(
!
$err
)
{
$self
->
logger
->
debug
("
All stable ID and archive tables in
$dbtype
db are empty.
\n
");
}
elsif
(
!
$err
)
{
$self
->
logger
->
debug
(
"
All stable ID and archive tables in
$dbtype
db are empty.
\n
");
}
return
$err
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment