CI failures after 7.12

After updating to 7.12, CI if crashing all over the place. I see lots of exceptions that look like below. gitlab-rake check seems fine and gitlab-ci-rake db:migrate are all up.

==> /var/log/gitlab/gitlab-ci/production.log <==
PG::UndefinedColumn: ERROR:  column builds.ref does not exist
LINE 1: SELECT  builds.id, builds.project_id, builds.ref, builds.sta...
                                              ^
: SELECT  builds.id, builds.project_id, builds.ref, builds.status, builds.finished_at, builds.created_at, builds.updated_at, builds.sha, builds.started_at, builds.tmp_file, builds.before_sha, builds.push_data, builds.runner_id, builds.commit_id, builds.coverage, builds.commands, builds.job_id FROM "builds"  WHERE "builds"."status" = 'pending' AND "builds"."runner_id" IS NULL AND "builds"."project_id" IN (SELECT "projects"."id" FROM "projects" INNER JOIN "runner_projects" ON "projects"."id" = "runner_projects"."project_id" WHERE "runner_projects"."runner_id" = $1)  ORDER BY created_at ASC LIMIT 1

ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR:  column builds.ref does not exist
LINE 1: SELECT  builds.id, builds.project_id, builds.ref, builds.sta...
                                              ^
: SELECT  builds.id, builds.project_id, builds.ref, builds.status, builds.finished_at, builds.created_at, builds.updated_at, builds.sha, builds.started_at, builds.tmp_file, builds.before_sha, builds.push_data, builds.runner_id, builds.commit_id, builds.coverage, builds.commands, builds.job_id FROM "builds"  WHERE "builds"."status" = 'pending' AND "builds"."runner_id" IS NULL AND "builds"."project_id" IN (SELECT "projects"."id" FROM "projects" INNER JOIN "runner_projects" ON "projects"."id" = "runner_projects"."project_id" WHERE "runner_projects"."runner_id" = $1)  ORDER BY created_at ASC LIMIT 1):
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/postgresql_adapter.rb:869:in `prepare'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/postgresql_adapter.rb:869:in `prepare_statement'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/postgresql_adapter.rb:826:in `exec_cache'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/postgresql/database_statements.rb:138:in `exec_query'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/postgresql_adapter.rb:954:in `select'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/querying.rb:39:in `find_by_sql'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation.rb:611:in `exec_queries'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation.rb:493:in `load'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation.rb:238:in `to_a'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/finder_methods.rb:476:in `find_nth_with_limit'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/finder_methods.rb:468:in `find_nth'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/relation/finder_methods.rb:132:in `first'
  /opt/gitlab/embedded/service/gitlab-ci/app/services/register_build_service.rb:24:in `execute'
  /opt/gitlab/embedded/service/gitlab-ci/lib/api/builds.rb:18:in `block (2 levels) in <class:Builds>'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:31:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:31:in `block in generate_api_method'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:401:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:401:in `run'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:154:in `block in call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/base.rb:24:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/base.rb:24:in `call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/base.rb:18:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/base.rb:24:in `call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/base.rb:18:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/error.rb:26:in `block in call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/error.rb:25:in `catch'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/error.rb:25:in `call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/middleware/base.rb:18:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:155:in `call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/endpoint.rb:145:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:152:in `block in call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:96:in `block in recognize'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:68:in `optimized_each'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:95:in `recognize'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:141:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/api.rb:525:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/api.rb:42:in `call!'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/grape-0.6.1/lib/grape/api.rb:38:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/journey/router.rb:73:in `block in call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/journey/router.rb:59:in `each'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/journey/router.rb:59:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/routing/route_set.rb:692:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:35:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/flash.rb:254:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/cookies.rb:562:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/query_cache.rb:36:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.1.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/callbacks.rb:82:in `run_callbacks'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/rack/logger.rb:38:in `call_app'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/rack/logger.rb:20:in `block in call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/tagged_logging.rb:68:in `block in tagged'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/tagged_logging.rb:26:in `tagged'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/tagged_logging.rb:68:in `tagged'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/rack/logger.rb:20:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.11/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/engine.rb:514:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/application.rb:144:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/railtie.rb:194:in `public_send'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.1.11/lib/rails/railtie.rb:194:in `method_missing'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:572:in `process_client'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:666:in `worker_loop'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:521:in `spawn_missing_workers'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:140:in `start'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/unicorn-4.8.2/bin/unicorn:126:in `<top (required)>'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/bin/unicorn:23:in `load'
  /opt/gitlab/embedded/service/gem/ruby/2.1.0/bin/unicorn:23:in `<main>'

==> /var/log/gitlab/nginx/gitlab_ci_access.log <==
[XX.XX.XX.XX]- - [01/Jul/2015:07:08:43 +0000] "POST /api/v1/builds/register.json HTTP/1.1" 500 40 "-" "Go 1.1 package http"

In case anyone finds this … I had error messages from dpkg while trying to update packages (omnibus), so did like it suggested and disabled migrations. Removing that migration block flag file and re-running migrations cleared this up.