Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Moe Khatib5,293 Points
Heroku db:migrate Error
I am still a rails beginner and I am trying to deploy an app to heroku but when trying to run the:
heroku run rake db:migrate
I am getting an error:
PG::DataCorrupted: ERROR: could not read block 6 in file "base/18350/12684": read only 0 of 8192 bytes : CREATE TABLE "searches" ("id" serial primary key, "city_id" integer, "num_weeks" integer, "num_seats" integer, "start_date" date, "student_name" character varying(255), "program_id" integer, "user_id" integer, "created_at" timestamp, "updated_at" timestamp) rake aborted! StandardError: An error has occurred, this and all later migrations canceled:
Here is the migration:
class CreateSearches < ActiveRecord::Migration def change create_table :searches do |t| t.integer :city_id t.integer :num_weeks t.integer :num_seats t.date :start_date t.string :student_name t.integer :program_id t.integer :user_id t.timestamps end end end
I am not quite sure what is going on, any help would be appreciate it.
Iyad HoraniCourses Plus Student 6,141 Points
I was having the same issue yesterday and contacted heroku support team, the database is working again, bellow is the response
Unfortunately, it looks like there was an issue with your database last night which caused an outage for a couple hours, however it's since been recovered by one of our on-call database engineers. This issue wasn't caused by you at all, it was a hardware failure on the host server.
Hope this helps.