I am trying to change the data type of a column :price in my :products table from :float to :integer but I keep getting these errors. I have tried everything and am so stuck I thought I would finally ask for help.
Here is my database migration file code:
class ChangeDataTypeForProductPrice < ActiveRecord::Migration[5.1]
def change
change_column :products, :price, :integer
end
end
Thank you to anyone in advance that can help me :)
And here is the output
Computers-MacBook-Pro:rubyapp MyComputer$ rails db:migrate
== 20180118162844 ChangeDataTypeForProductPrice: migrating ====================
-- change_column(:products, :price, :integer)
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::ConstraintException: FOREIGN KEY constraint failed: DROP TABLE "products"
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:108:in `step'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:108:in `block in each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:107:in `loop'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:107:in `each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:152:in `map'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:152:in `block in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:95:in `prepare'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:251:in `block (2 levels) in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:250:in `block in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:249:in `execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:471:in `drop_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:435:in `move_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:427:in `block in alter_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:426:in `alter_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:376:in `change_column'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:849:in `block in method_missing'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:818:in `block in say_with_time'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:818:in `say_with_time'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:838:in `method_missing'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/db/migrate/20180118162844_change_data_type_for_product_price.rb:3:in `change'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:792:in `exec_migration'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:776:in `block (2 levels) in migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:775:in `block in migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:408:in `with_connection'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:774:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:953:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1230:in `block in execute_migration_in_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1298:in `block in ddl_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1298:in `ddl_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1229:in `execute_migration_in_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1201:in `block in migrate_without_lock'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1200:in `each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1200:in `migrate_without_lock'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1150:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1007:in `up'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:985:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:171:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/rails:9:in `require'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/rails:9:in `<top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/spring:15:in `require'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
ActiveRecord::InvalidForeignKey: SQLite3::ConstraintException: FOREIGN KEY constraint failed: DROP TABLE "products"
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:108:in `step'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:108:in `block in each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:107:in `loop'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:107:in `each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:152:in `map'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:152:in `block in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:95:in `prepare'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:251:in `block (2 levels) in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:250:in `block in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:249:in `execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:471:in `drop_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:435:in `move_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:427:in `block in alter_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:426:in `alter_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:376:in `change_column'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:849:in `block in method_missing'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:818:in `block in say_with_time'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:818:in `say_with_time'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:838:in `method_missing'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/db/migrate/20180118162844_change_data_type_for_product_price.rb:3:in `change'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:792:in `exec_migration'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:776:in `block (2 levels) in migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:775:in `block in migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:408:in `with_connection'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:774:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:953:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1230:in `block in execute_migration_in_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1298:in `block in ddl_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1298:in `ddl_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1229:in `execute_migration_in_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1201:in `block in migrate_without_lock'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1200:in `each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1200:in `migrate_without_lock'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1150:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1007:in `up'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:985:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:171:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/rails:9:in `require'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/rails:9:in `<top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/spring:15:in `require'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
SQLite3::ConstraintException: FOREIGN KEY constraint failed
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:108:in `step'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:108:in `block in each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:107:in `loop'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb:107:in `each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:152:in `map'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:152:in `block in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:95:in `prepare'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:251:in `block (2 levels) in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:250:in `block in execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:249:in `execute'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:471:in `drop_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:435:in `move_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:427:in `block in alter_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:426:in `alter_table'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:376:in `change_column'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:849:in `block in method_missing'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:818:in `block in say_with_time'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:818:in `say_with_time'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:838:in `method_missing'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/db/migrate/20180118162844_change_data_type_for_product_price.rb:3:in `change'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:792:in `exec_migration'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:776:in `block (2 levels) in migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:775:in `block in migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:408:in `with_connection'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:774:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:953:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1230:in `block in execute_migration_in_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1298:in `block in ddl_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1298:in `ddl_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1229:in `execute_migration_in_transaction'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1201:in `block in migrate_without_lock'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1200:in `each'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1200:in `migrate_without_lock'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1150:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:1007:in `up'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/migration.rb:985:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:171:in `migrate'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/activerecord-5.1.4/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/rails:9:in `require'
/Users/MyComputer/Documents/Career Foundry/Achievement 3 - Basic Rails Web App/rubyapp/bin/rails:9:in `<top (required)>'
/Users/MyComputer/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'