Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
14a86999
Commit
14a86999
authored
Nov 21, 2011
by
Andreas Kusalananda Kähäri
Browse files
To specify a too new release is an error.
parent
b4fcf91c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
misc-scripts/schema_patcher.pl
misc-scripts/schema_patcher.pl
+13
-0
No files found.
misc-scripts/schema_patcher.pl
View file @
14a86999
...
...
@@ -203,6 +203,7 @@ if ( defined($opt_type) &&
die
(
sprintf
(
"
Unknown schema type: %s
\n
",
$opt_type
)
);
}
my
$latest_release
;
my
%patches
;
# Get available patches.
...
...
@@ -230,6 +231,12 @@ foreach my $thing ( [ 'ensembl', 'core' ],
if
(
$file_name
=~
/^patch_\d+_(\d+)_?[a-z]?\.sql$/
)
{
my
$patch_release
=
$
1
;
if
(
!
defined
(
$latest_release
)
||
$latest_release
<
$patch_release
)
{
$latest_release
=
$patch_release
;
}
if
(
$opt_verbose
)
{
printf
(
"
Found %s patch file '%s' for release %d
\n
",
$schema_type
,
$file_name
,
$patch_release
);
...
...
@@ -244,6 +251,12 @@ foreach my $thing ( [ 'ensembl', 'core' ],
}
## end foreach my $thing ( [ 'ensembl'...])
if
(
$opt_release
>
$latest_release
)
{
die
(
sprintf
(
"
Release %d is too new,
"
.
"
last release with patches is release %d
\n
",
$opt_release
,
$latest_release
)
);
}
my
$dsn
=
sprintf
(
"
DBI:mysql:host=%s;port=%d
",
$opt_host
,
$opt_port
);
my
$dbh
=
DBI
->
connect
(
$dsn
,
$opt_user
,
$opt_pass
,
...
...
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