ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "cohorts" does not exist
LINE 5: WHERE a.attrelid = '"cohorts"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"cohorts"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:10:in `block (3 levels) in <top (required)>'
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:9:in `block (2 levels) in <top (required)>'
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:2:in `block in <top (required)>'
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:1:in `<top (required)>'
/Users/Habib/Documents/Development/mood_swings/config/environment.rb:5:in `<top (required)>'
PG::UndefinedTable: ERROR: relation "cohorts" does not exist
LINE 5: WHERE a.attrelid = '"cohorts"'::regclass
^
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:10:in `block (3 levels) in <top (required)>'
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:9:in `block (2 levels) in <top (required)>'
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:2:in `block in <top (required)>'
/Users/Habib/Documents/Development/mood_swings/spec/factories/users.rb:1:in `<top (required)>'
/Users/Habib/Documents/Development/mood_swings/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)