首页 > 解决方案 > Error running rake db:migrate RAILS_ENV=development

问题描述

When I run the following command:

rake db:migrate RAILS_ENV=development

I am having this error:

rake aborted! StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR: relation "job_offers" already exists : CREATE TABLE "job_offers" ("id" serial primary key, "company_id" integer, "job_day_id" integer, "state" character varying(30), "date" date, "hour_begin" time, "hour_end" time, "expires_at" timestamp, "payment_type" character varying(30), "daily_rate" decimal, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)

标签: ruby-on-rails-4rakedatabase-migration

解决方案


推荐阅读