Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Sitin/754eca65c45d2f37c8d0bd4eba99c91b to your computer and use it in GitHub Desktop.
Save Sitin/754eca65c45d2f37c8d0bd4eba99c91b to your computer and use it in GitHub Desktop.
Career Hub migration failure
$ UPLOADCARE_PUBLIC_KEY=foo UPLOADCARE_PRIVATE_KEY=bar bundle exec rake db:migrate
I, [2017-03-07T14:32:43.625090 #6360] INFO -- sentry: ** [Raven] Raven 1.2.0 configured not to send errors.
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in <class:Railtie> at /Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/react-rails-1.8.0/lib/react/rails/railtie.rb:110)
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:57)
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sass-rails-5.0.5/lib/sass/rails/railtie.rb:58)
[Simple Form] Simple Form is not configured in the application and will use the default values. Use `rails generate simple_form:install` to generate the Simple Form configuration.
DEPRECATION WARNING: You are using the a deprecated processor interface #<Proc:0x007fa62f45bd98@/Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/xray-rails-0.1.21/lib/xray/engine.rb:22>.
Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in <class:Engine> at /Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/xray-rails-0.1.21/lib/xray/engine.rb:22)
DEPRECATION WARNING: You are using the a deprecated processor interface #<Proc:0x007fa62f459368@/Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/xray-rails-0.1.21/lib/xray/engine.rb:56>.
Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block in <class:Engine> at /Users/sitin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/xray-rails-0.1.21/lib/xray/engine.rb:56)
== 20160712140630 ViewsForExportingHerokuDataclips: migrating =================
-- execute(" CREATE VIEW export_surveys AS SELECT A.name AS \"name\", B.name AS \"market\", C.name AS \"locale\", (SELECT string_agg(CAST(D.name as varchar), ',') FROM locales D where id IN (select locale_id from optional_locales E where A.id = E.survey_id)) as \"locales\",A.begin_at AS \"begin_date\",A.end_at AS \"end_date\",A.global AS \"global\",A.special AS \"special\",A.status AS \"status\",A.url as \"url\" from surveys A LEFT JOIN markets B ON A.market_id=B.id LEFT JOIN locales C ON A.locale_id=C.id;\n\n CREATE VIEW export_distributions AS SELECT A.name as \"name\", B.name AS \"survey\", C.name AS \"source_type\", D.name as \"market\",B.url as \"url\",A.reid as \"reid\",A.is_default AS \"default\" ,A.skip_opt_in as \"skip_opt_in\" ,A.skip_reid AS \"skip_reid\" from distributions A LEFT JOIN surveys B ON A.survey_id=B.id LEFT JOIN source_types C ON A.source_type_id=C.id LEFT JOIN markets D ON A.survey_id=B.id and B.market_id = D.id;;\n")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedColumn: ERROR: column a.begin_at does not exist
LINE 1: ...locales E where A.id = E.survey_id)) as "locales",A.begin_at...
^
: CREATE VIEW export_surveys AS SELECT A.name AS "name", B.name AS "market", C.name AS "locale", (SELECT string_agg(CAST(D.name as varchar), ',') FROM locales D where id IN (select locale_id from optional_locales E where A.id = E.survey_id)) as "locales",A.begin_at AS "begin_date",A.end_at AS "end_date",A.global AS "global",A.special AS "special",A.status AS "status",A.url as "url" from surveys A LEFT JOIN markets B ON A.market_id=B.id LEFT JOIN locales C ON A.locale_id=C.id;
CREATE VIEW export_distributions AS SELECT A.name as "name", B.name AS "survey", C.name AS "source_type", D.name as "market",B.url as "url",A.reid as "reid",A.is_default AS "default" ,A.skip_opt_in as "skip_opt_in" ,A.skip_reid AS "skip_reid" from distributions A LEFT JOIN surveys B ON A.survey_id=B.id LEFT JOIN source_types C ON A.source_type_id=C.id LEFT JOIN markets D ON A.survey_id=B.id and B.market_id = D.id;;
/Users/sitin/Documents/Workspace/Chimplie/careerhub-admin/db/migrate/20160712140630_views_for_exporting_heroku_dataclips.rb:3:in `up'
/Users/sitin/.rbenv/versions/2.3.0/bin/bundle:23:in `load'
/Users/sitin/.rbenv/versions/2.3.0/bin/bundle:23:in `<main>'
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column a.begin_at does not exist
LINE 1: ...locales E where A.id = E.survey_id)) as "locales",A.begin_at...
^
: CREATE VIEW export_surveys AS SELECT A.name AS "name", B.name AS "market", C.name AS "locale", (SELECT string_agg(CAST(D.name as varchar), ',') FROM locales D where id IN (select locale_id from optional_locales E where A.id = E.survey_id)) as "locales",A.begin_at AS "begin_date",A.end_at AS "end_date",A.global AS "global",A.special AS "special",A.status AS "status",A.url as "url" from surveys A LEFT JOIN markets B ON A.market_id=B.id LEFT JOIN locales C ON A.locale_id=C.id;
CREATE VIEW export_distributions AS SELECT A.name as "name", B.name AS "survey", C.name AS "source_type", D.name as "market",B.url as "url",A.reid as "reid",A.is_default AS "default" ,A.skip_opt_in as "skip_opt_in" ,A.skip_reid AS "skip_reid" from distributions A LEFT JOIN surveys B ON A.survey_id=B.id LEFT JOIN source_types C ON A.source_type_id=C.id LEFT JOIN markets D ON A.survey_id=B.id and B.market_id = D.id;;
/Users/sitin/Documents/Workspace/Chimplie/careerhub-admin/db/migrate/20160712140630_views_for_exporting_heroku_dataclips.rb:3:in `up'
/Users/sitin/.rbenv/versions/2.3.0/bin/bundle:23:in `load'
/Users/sitin/.rbenv/versions/2.3.0/bin/bundle:23:in `<main>'
PG::UndefinedColumn: ERROR: column a.begin_at does not exist
LINE 1: ...locales E where A.id = E.survey_id)) as "locales",A.begin_at...
^
/Users/sitin/Documents/Workspace/Chimplie/careerhub-admin/db/migrate/20160712140630_views_for_exporting_heroku_dataclips.rb:3:in `up'
/Users/sitin/.rbenv/versions/2.3.0/bin/bundle:23:in `load'
/Users/sitin/.rbenv/versions/2.3.0/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment