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
53c8e85c
Commit
53c8e85c
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Update --about text.
parent
0472d219
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/production_database/scripts/push_master_tables.pl
+31
-21
31 additions, 21 deletions
...scripts/production_database/scripts/push_master_tables.pl
with
31 additions
and
21 deletions
misc-scripts/production_database/scripts/push_master_tables.pl
+
31
−
21
View file @
53c8e85c
...
...
@@ -50,38 +50,48 @@ USAGE_END
sub
about
{
print
<<ABOUT_END;
Run the program with --help to get information about available command
line switches.
About:
This program takes the master tables from the production database
and compares it to the corresponding tables on the given servers (by
default, the staging servers).
Run the program with --help to get information about available command
line switches.
The
program
will display any discrepancies on the display whil
e
writing SQL to files in a subdirectory
o
f
the
current directory called
"$outdir" that will correct the discrepancies
.
This
program
takes the master tables from the production databas
e
and compares it to the corresponding tables
o
n
the
given servers (by
default, the staging servers)
.
Each SQL patch file will have the generic name "fix-DBNAME.sql"
where "DBNAME" is the name of the database, e.g.,
"$outdir
/fix-oryctolagus_cuniculus_otherfeatures_60_3.sql"
.
The program will display any discrepancies on the display while
writing SQL to files in a subdirectory of the current directory called
"$outdir
" that will correct the discrepancies
.
A discrepancy is patched by
Each SQL patch file will have the generic name "fix-DBNAME.sql"
where "DBNAME" is the name of the database, e.g.,
"$outdir/fix-oryctolagus_cuniculus_otherfeatures_60_3.sql".
1) Insertion into the master table in the production database in the
case where a new entry has been added to a database without being
added to the master table.
A discrepancy is patched by
2) Insertion into the database table in the case where a new master
entry is missing in the database.
1) Insertion into the master table in the production database in the
case where a new entry has been added to a database without being
added to the master table. Note that each line of this SQL will
by default be prefixed with "#!!" to avoid accidental modification
of the production database.
3) Updating
the database
entry
in the case where a
n entry (identified by
its primary key only) differs in any of its fields
.
2) Insertion into
the database
table
in the case where a
new master
entry is missing in the database
.
The SQL patch files may then be used to patch the databases:
3) Updating the database entry in the case where an entry (identified
by its primary key only) differs in any of its fields.
\$ mysql -h server -u user -ppass < fix-DBNAME.sql
4) The script will also detect entries that have the wrong primary
key but that are otherwise the same. In these cases, helpful SQL
will be suggested in the output file.
The SQL patch files may then be used to patch the databases:
\$ mysql -h server -u user -ppass < fix-DBNAME.sql
All tables are qualified with their corresponding database name in the
SQL file, so there's no need to specify more than the database server
itself on the command line when applying a patch.
BE SURE TO REVIEW THESE SQL PATCH FILES
...
...
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