Last active
July 24, 2017 12:15
-
-
Save DonKoko/4253b4fc6bf7985954e5c4629bb3a4ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChangeFkTournamentSeasons < ActiveRecord::Migration | |
def change | |
rename_column :tournament_seasons, :license_id, :licence_id | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChangeFkUserLicense < ActiveRecord::Migration | |
def change | |
rename_column :user_licences, :license_id, :licence_id | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migrating to RenameLicenses (20170721162553) | |
Migrating to RenameUserLicenses (20170721163335) | |
Migrating to ChangeFkUserLicense (20170721163543) | |
Migrating to ChangeFkTournamentSeasons (20170721164259) | |
(0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" | |
PG::UndefinedTable: ERROR: relation "user_licenses" does not exist | |
LINE 5: WHERE a.attrelid = '"user_licenses"'::regclass | |
^ | |
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), | |
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod | |
FROM pg_attribute a LEFT JOIN pg_attrdef d | |
ON a.attrelid = d.adrelid AND a.attnum = d.adnum | |
WHERE a.attrelid = '"user_licenses"'::regclass | |
AND a.attnum > 0 AND NOT a.attisdropped | |
ORDER BY a.attnum | |
rake aborted! | |
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "user_licenses" does not exist | |
LINE 5: WHERE a.attrelid = '"user_licenses"'::regclass | |
^ | |
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), | |
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod | |
FROM pg_attribute a LEFT JOIN pg_attrdef d | |
ON a.attrelid = d.adrelid AND a.attnum = d.adnum | |
WHERE a.attrelid = '"user_licenses"'::regclass | |
AND a.attnum > 0 AND NOT a.attisdropped | |
ORDER BY a.attnum | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `async_exec' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec_no_cache' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:660:in `block in exec_query' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1286:in `column_definitions' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:855:in `columns' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/model_schema.rb:228:in `yield' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/model_schema.rb:228:in `columns' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:85:in `make_annotation!' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:42:in `annotatable?' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:142:in `block in annotate!' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:141:in `each' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:141:in `annotate!' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/rake_task.rake:4:in `block in <top (required)>' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/rake_task.rake:15:in `block (2 levels) in <top (required)>' | |
/Users/Donkoko/devs/RubyOnRails/timvp/lib/tasks/sample_data.rake:9:in `block (2 levels) in <top (required)>' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `eval' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `<main>' | |
PG::UndefinedTable: ERROR: relation "user_licenses" does not exist | |
LINE 5: WHERE a.attrelid = '"user_licenses"'::regclass | |
^ | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `async_exec' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec_no_cache' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:660:in `block in exec_query' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1286:in `column_definitions' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:855:in `columns' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/model_schema.rb:228:in `yield' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.13/lib/active_record/model_schema.rb:228:in `columns' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:85:in `make_annotation!' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:42:in `annotatable?' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:142:in `block in annotate!' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:141:in `each' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/models.rb:141:in `annotate!' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/rake_task.rake:4:in `block in <top (required)>' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/gems/annotated-rails-0.0.2/lib/annotated/rake_task.rake:15:in `block (2 levels) in <top (required)>' | |
/Users/Donkoko/devs/RubyOnRails/timvp/lib/tasks/sample_data.rake:9:in `block (2 levels) in <top (required)>' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `eval' | |
/Users/Donkoko/.rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `<main>' | |
Tasks: TOP => annotate-rails | |
(See full trace by running task with --trace) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RenameLicenses < ActiveRecord::Migration | |
def change | |
rename_table :licenses, :licences | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RenameUserLicenses < ActiveRecord::Migration | |
def change | |
rename_table :user_licenses, :user_licences | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment