I have to add contraints (CHECK) on a sql table through rails migration. How should I? I googled and got to know about using something as follows,
execute “ALTER TABLE table_name ADD CONSTRAINT check_constraint_name CHECK (check_column_name IN (1, 2, 3) )”
But am not sure if it appropriate to implement it this way or if there is any better method to get it done?