Branchwell

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

Raw 435 B on b7854f3692d64213a2fce644d0b5101d3e345b03
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;