Toolserver:Admin:Toolserver database
Appearance
This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.
The toolserver database holds meta-information about the other databases. The master copy of it is located on the sql-toolserver database, and it is updated on all servers nightly using the script /opt/local/bin/refresh-ts-db
.
Changing the schema
[edit]If you need to change the schema, or add or remove tables, use the following procedure:
- Change the schema on sql-toolserver. For new tables, create MyISAM tables.
- If you added or removed a table, edit codett>/global/misc/puppet/etc/modules/database/files/refresh-ts-db on the HA cluster and change
TABLES
appropriately. - Apply your schema change to all database servers. For example:
willow% dsh -g database 'pfexec env HOME=/root mysql -e "source /home/jsmith/newschema.sql"'
- If you create new tables on servers other than sql-toolserver, create InnoDB tables. (Otherwise, the database update script will not work properly.)