Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Revert "Fix(migrations): recreate contact_summary view in remove acquisition migration"

Jonathan ARNAULTb06bca737b13
diff --git a/supabase/migrations/20240807082449_remove-aquisition.sql b/supabase/migrations/20240807082449_remove-aquisition.sql
index 0286c901..20fec3b0 100644
--- a/supabase/migrations/20240807082449_remove-aquisition.sql
+++ b/supabase/migrations/20240807082449_remove-aquisition.sql
@@ -1,20 +1,2 @@
--- this will drop the `contacts_summary` view as well
ALTER TABLE "public"."contacts"
-DROP COLUMN acquisition CASCADE;
-
- -- We need to recreate the view with the new schema
-
-create view "public"."contacts_summary"
-as
-select
- co.*,
- c.name as company_name,
- count(distinct t.id) as nb_tasks
-from
- "public"."contacts" co
-left join
- "public"."tasks" t on co.id = t.contact_id
-left join
- "public"."companies" c on co.company_id = c.id
-group by
- co.id, c.name;
+DROP COLUMN acquisition CASCADE;
\ No newline at end of file