If you have access to the command-line and know your MySQL credentials, then there is a way we could do this via a SQL query. If you are not the person responsible for installing and maintaining your AtoM instance, feel free to pass this message on to that person.
Essentially, we can first use a SQL query to delete only the slugs associated with the authority records. Then we can use the
slug generation command-line task to generate new slugs for those records, which will pull from the updated authorized forms of name.
I have previously tested this query locally in my Vagrant box (against a 2.5 installation), but as always with scripts and queries shared in the user forum, this is shared as-is, and you should use it at your own risk. Please be sure to back up your data first, in case anything goes wrong!
Here goes!
To use the query, we will first need to access the MySQL command prompt. To do that, we will need to know the MySQL username, password, and database name used during installation. If you can't recall for certain what credentials you used, you can always check in config/config.php - for example, to see this file you could run the following from the root AtoM installation directory, which should be /usr/share/nginx/atom if you have followed our recommended installation instructions:
- sudo nano config/config.php
You should see the database name and credentials listed near the top of the file. You can also check your database username and password in
/root/.my.cnf like so:
Once you have the database name, MySQL user name, and password, we can use these to access the MySQL command prompt. Assuming in the following example that your database name is
atom and your user and password are
root, you could access the prompt like so:
- mysql -u root -proot atom;
Notice that there is a space between the -u and root, but NOT between the -p and the root password. Alternatively, you can leave no password following the -p, and you will be prompted to enter it by the command prompt before proceeding.
At this point, we should have access to the MySQL command prompt, which should look like this:
mysql>
We can now use a custom SQL query to target just the slugs of the authority records. You can find detailed instructions on the query in this previous forum thread, which also includes the steps to run the AtoM slug generation task after, and some follow-up maintenance tasks: