ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "active_forms" does not exist

I’m an absolute Ruby and Rails beginner who is tasked with upgrading a very old Rails app from 4.2.10 to 5.0.

Here’s what I did:

  1. Set up a dev server and clone the PostgreSQL db from the production Rails 4.2 server to the dev server. I didn’t run any rails db:* stuff.

  2. Upgrade Rails from 4.2.10 to 4.2.11.3, small fixes, all tests still pass

  3. Upgrade Rails to 5.0.7.2 and update code based on info in Upgrading Ruby on Rails — Ruby on Rails Guides

  4. ‘rails server’ works fine and I can access the home page of the app, but whenever I click “user search”, I hit the following error:

Completed 401 Unauthorized in 116ms (ActiveRecord: 26.6ms)
  
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "active_forms" does not exist
LINE 8:                WHERE a.attrelid = '"active_forms"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
             (SELECT c.collname FROM pg_collation c, pg_type t
               WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation),
                     col_description(a.attrelid, a.attnum) AS comment
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"active_forms"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
):
  
app/controllers/users_controller.rb:35:in `index'

Any help is appreciated. Thanks.