Skip to content

Instantly share code, notes, and snippets.

@den-crane
Created March 13, 2020 16:59
Show Gist options
  • Save den-crane/d9a0bceb58a7d5314ea66e8edbebc9f7 to your computer and use it in GitHub Desktop.
Save den-crane/d9a0bceb58a7d5314ea66e8edbebc9f7 to your computer and use it in GitHub Desktop.
Rename MV in CH before 19.8.3.8
detach table MVName;
rename table .inner.MVName to .inner.MVNameNEW;
rename .sql file and edit (using vi) /var/lib/clickhouse/metadata/database/MVName.sql
attach table MVNameNEW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment