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
a7cbc9e8
Commit
a7cbc9e8
authored
Jan 18, 2011
by
Andreas Kusalananda Kähäri
Browse files
Generate code to remove master table entries marked with is_current = 0.
parent
befced1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
misc-scripts/production_database/scripts/push_master_tables.pl
...scripts/production_database/scripts/push_master_tables.pl
+12
-0
No files found.
misc-scripts/production_database/scripts/push_master_tables.pl
View file @
a7cbc9e8
...
...
@@ -370,6 +370,18 @@ foreach my $server (@servers) {
print
("
\n
");
}
## end if ($is_missing)
}
elsif
(
$master_row
->
{'
is_current
'}
==
0
)
{
display_banner
(
'
=
',
sprintf
(
'
%s.%s
',
$dbname
,
$table
)
);
print
("
==> Entry has been deprecated:
\n
");
print
(
Dumper
(
$row
)
);
push
(
@
{
$sql
{
$dbname
}
},
sprintf
(
"
-- Entry with %s_id = %d is deprecated
\n
",
$table
,
$pk
),
sprintf
(
"
DELETE FROM %s WHERE %s_id = %d;
\n\n
",
$table
,
$table
,
$pk
)
);
}
else
{
my
%diff_fields
;
...
...
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