Skip to content

Instantly share code, notes, and snippets.

@andrerom
Last active January 9, 2020 15:16

Revisions

  1. andrerom revised this gist Jan 9, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion update_paths.sql
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,5 @@ SET name = REPLACE(name, 'var/storage', 'var/ca/storage'),
    name_hash = MD5(REPLACE(name, 'var/storage', 'var/my/storage'))
    WHERE name like '%var/storage%';

    -- Remember to clear all (platform & legacy) cache afterwards
    -- Remember to clear all (platform & legacy) cache afterwards
    -- Credits @bdunogier
  2. andrerom revised this gist Jan 9, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion update_paths.sql
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,4 @@ SET name = REPLACE(name, 'var/storage', 'var/ca/storage'),
    name_hash = MD5(REPLACE(name, 'var/storage', 'var/my/storage'))
    WHERE name like '%var/storage%';

    -- Remember to clear all cache afterwards
    -- Remember to clear all (platform & legacy) cache afterwards
  3. andrerom revised this gist Jan 9, 2020. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions update_paths.sql
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,3 @@


    -- Update image paths
    UPDATE ezimagefile SET filepath = REPLACE(filepath, 'var/storage', 'var/my/storage');

  4. andrerom revised this gist Jan 9, 2020. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion update_paths.sql
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,15 @@


    -- Update image paths
    UPDATE ezimagefile SET filepath = REPLACE(filepath, 'var/storage', 'var/my/storage');

    -- Before this you may run legacy script to cleanup dfs data to wipe out caches from the table: php bin/php/dfscleanup.php

    -- Update DFS tables (only relevant if you use Clustering)
    UPDATE IGNORE ezdfsfile
    SET name = REPLACE(name, 'var/storage', 'var/ca/storage'),
    name_trunk = REPLACE(name_trunk, 'var/storage', 'var/my/storage'),
    name_hash = MD5(REPLACE(name, 'var/storage', 'var/my/storage'))
    WHERE name like '%var/storage%';
    WHERE name like '%var/storage%';

    -- Remember to clear all cache afterwards
  5. andrerom created this gist Jan 9, 2020.
    9 changes: 9 additions & 0 deletions update_paths.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    -- Update image paths
    UPDATE ezimagefile SET filepath = REPLACE(filepath, 'var/storage', 'var/my/storage');

    -- Update DFS tables (only relevant if you use Clustering)
    UPDATE IGNORE ezdfsfile
    SET name = REPLACE(name, 'var/storage', 'var/ca/storage'),
    name_trunk = REPLACE(name_trunk, 'var/storage', 'var/my/storage'),
    name_hash = MD5(REPLACE(name, 'var/storage', 'var/my/storage'))
    WHERE name like '%var/storage%';