Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

FIXES DEVELOPER-3538 (lots of url_aliases) #1463

Merged

Conversation

LightGuard
Copy link
Member

See https://issues.jboss.org/browse/DEVELOPER-3538 for more information.

This addresses content pages (note things like video pages and some
resource pages will still always be updated) going forward. They will
not be updated unless the source is newer than what's already within
Drupal.

To mitigate the extraneous aliases we'll need to run the following SQL
on the production database:

CREATE TEMPORARY TABLE tmp_alias
  SELECT pid, source, alias
  FROM url_alias
  WHERE url_alias.pid <> (SELECT MAX(pid)
                          FROM url_alias AS inner_alias
                          WHERE inner_alias.alias = url_alias.alias);

DELETE url_alias
FROM url_alias
INNER JOIN tmp_alias
ON url_alias.pid = tmp_alias.pid

See https://issues.jboss.org/browse/DEVELOPER-3538 for more information.

This addresses content pages (note things like video pages and some
resource pages will still always be updated) going forward. They will
not be updated unless the source is newer than what's already within
Drupal.

To mitigate the extraneous aliases we'll need to run the following SQL
on the production database:

```
CREATE TEMPORARY TABLE tmp_alias
  SELECT pid, source, alias
  FROM url_alias
  WHERE url_alias.pid <> (SELECT MAX(pid)
                          FROM url_alias AS inner_alias
                          WHERE inner_alias.alias = url_alias.alias);

DELETE url_alias
FROM url_alias
INNER JOIN tmp_alias
ON url_alias.pid = tmp_alias.pid
```
@LightGuard
Copy link
Member Author

The easiest way to test this is to have a Drupal instance up and running that already has data in it from a previous run.

@JBossJenkins
Copy link

RHD success

Copy link
Contributor

@Dantheman720 Dantheman720 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Dantheman720 Dantheman720 merged commit f8674dc into redhat-developer:master Sep 22, 2016
@LightGuard LightGuard deleted the feature/DEVELOPER-3538 branch October 11, 2016 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants