Branchwell

AI Resource Pro / website / scripts / rename-tool-count-column.sql

1-- SQL to rename the tool_count column to instance_count in the categories table
2-- This better reflects that it counts instances across multiple content types
3
4-- Rename the column
5ALTER TABLE categories
6RENAME COLUMN tool_count TO instance_count;
7
8-- Verify the change
9SELECT column_name, data_type, is_nullable
10FROM information_schema.columns
11WHERE table_schema = 'public'
12AND table_name = 'categories'
13ORDER BY ordinal_position;