38873-vm/db/migrations/10_add_missing_startup_fields.sql
Flatlogic Bot d9eba63b0d v26
2026-02-28 18:56:22 +00:00

8 lines
390 B
SQL

-- Migration: Add missing fields to startups table for Discovery Hub and Details page
ALTER TABLE startups
ADD COLUMN industry VARCHAR(100) AFTER description,
ADD COLUMN followers_count INT DEFAULT 0 AFTER status;
-- Initialize followers_count from existing startup_followers table
UPDATE startups s SET followers_count = (SELECT COUNT(*) FROM startup_followers WHERE startup_id = s.id);