Skip to content

Instantly share code, notes, and snippets.

@andrerom
Last active January 9, 2020 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrerom/b6a931615a3af66bd470544952ac4bd1 to your computer and use it in GitHub Desktop.
Save andrerom/b6a931615a3af66bd470544952ac4bd1 to your computer and use it in GitHub Desktop.
eZ Platform / Publish update var dir paths
-- 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%';
-- Remember to clear all (platform & legacy) cache afterwards
-- Credits @bdunogier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment