Last active
March 27, 2023 23:46
-
-
Save ip75/0feb6efdc2f677da3a6d21ca4c187f9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT (regexp_match(m.file_url, '^.+/(.+)$'))[1] FROM media m WHERE m.file_url LIKE 'http%'; | |
UPDATE media | |
SET file_url = (regexp_match(file_url, '^.+/(.+)$'))[1] | |
WHERE file_url LIKE 'http%'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment