Error after upgrading, possibly missing records in the database

Hello,

After upgrading to the latest version, it run into below error when going to the homepage:

ArgumentError in HomepageController#index

Error(s) in /home/ec2-user/.rvm/gems/ruby-2.3.1/gems/possibly-0.2.0/lib/possibly.rb:4:in `map’: availability: Value must be one of [:none, :booking]. Was: .

Does this mean some records are missing in the database? If so, which table and field it should be?

Thanks.

Hi!

Have you run all the migrations? You can see the status with rake db:migrate:status and run all the pending migrations with rake db:migrate.

  • Kimmo

Yes, I did run it, but it failed and “an error has occurred, all later migrations canceled”, I see below error in the log, I’ll try to fix it:

DEBUG (0.9ms)
UPDATE listing_shapes ls
LEFT JOIN transaction_processes txp_current ON (txp_current.id = ls.transaction_process_id)
LEFT JOIN payment_gateways pg ON (pg.community_id = ls.community_id)
SET ls.transaction_process_id = (SELECT id FROM transaction_processes WHERE community_id = ls.community_i d AND process = ‘none’ AND author_is_seller = 1)
WHERE txp_current.process = ‘postpay’ AND pg.type = ‘Checkout’;

rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Column ‘transaction_process_id’ cannot be null:
UPDATE listing_shapes ls
LEFT JOIN transaction_processes txp_current ON (txp_current.id = ls.transaction_process_id)
LEFT JOIN payment_gateways pg ON (pg.community_id = ls.community_id)
SET ls.transaction_process_id = (SELECT id FROM transaction_processes WHERE community_id = ls.community_i d AND process = ‘none’ AND author_is_seller = 1)
WHERE txp_current.process = ‘postpay’ AND pg.type = ‘Checkout’;