Set up database code in crm.rb