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
26a48226
Commit
26a48226
authored
13 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
Quick error message incase your run found no databases to patch
parent
9338e1ad
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
misc-scripts/schema_patcher.pl
+9
-1
9 additions, 1 deletion
misc-scripts/schema_patcher.pl
with
9 additions
and
1 deletion
misc-scripts/schema_patcher.pl
+
9
−
1
View file @
26a48226
...
...
@@ -238,7 +238,7 @@ foreach my $thing ( [ 'ensembl', 'core', 'table.sql' ],
my
$sql_dir
=
_sql_dir
(
$cvs_module
,
$schema_file
);
if
(
!
defined
$sql_dir
)
{
if
(
!
$opt_quiet
)
{
warn
(
printf
("
No SQL directory found for CVS module %s
\n
",
$cvs_module
));
warn
(
s
printf
("
No SQL directory found for CVS module %s
\n
",
$cvs_module
));
}
next
;
}
...
...
@@ -304,6 +304,7 @@ if(! $dbh) {
# patch and filter out the ones that we don't want to patch.
my
$sth
;
my
$found_databases
=
0
;
if
(
defined
(
$opt_database
)
)
{
$sth
=
$dbh
->
prepare
("
SHOW DATABASES LIKE ?
");
...
...
@@ -440,6 +441,7 @@ while ( $sth->fetch() ) {
(
(
!
$opt_fix
&&
$schema_version
<
$opt_release
)
||
(
$opt_fix
&&
$schema_version
<=
$opt_release
)
)
)
{
$found_databases
=
1
;
print
(
'
-
'
x
(
$ENV
{
COLUMNS
}
||
80
),
"
\n
"
);
printf
(
"
Considering '%s' [%s,%s,%d]
\n
",
$database
,
defined
(
$species
)
?
$species
:
'
unknown
',
...
...
@@ -584,6 +586,12 @@ while ( $sth->fetch() ) {
}
## end while ( $sth->fetch() )
if
(
!
$found_databases
)
{
printf
(('
-
'
x80
)
.
"
\n
");
printf
("
No databases considered. Check your --database/--type/--release flags
\n
");
printf
(('
-
'
x80
)
.
"
\n
");
}
$dbh
->
disconnect
();
sub
_sql_dir
{
...
...
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