diff --git a/database/migrations/063_fix_website_urls_prefix.sql b/database/migrations/063_fix_website_urls_prefix.sql new file mode 100644 index 0000000..5ad7edf --- /dev/null +++ b/database/migrations/063_fix_website_urls_prefix.sql @@ -0,0 +1,10 @@ +-- Migration 063: Fix website URLs missing https:// prefix +-- 14 companies have website URLs without http/https scheme + +UPDATE companies +SET website = 'https://' || website, + updated_at = NOW() +WHERE website IS NOT NULL + AND website != '' + AND website NOT LIKE 'http://%' + AND website NOT LIKE 'https://%'; diff --git a/templates/company_detail.html b/templates/company_detail.html index 97e859c..18504f8 100755 --- a/templates/company_detail.html +++ b/templates/company_detail.html @@ -1007,7 +1007,7 @@ {% endfor %} {% elif company.website %} -