尝试迁移数据库时出现错误。我不完全记得我是如何来到这里的,但我相信我:
- 创建新分支,搭建“请求”,db:migrated,切换回主分支,合并分支
- 创建了另一个分支,做了一些事情,db:migrated,一切正常。
从heroku postgres数据库中提取,所以我可以测试事情是否适用于实际数据。然后尝试数据库迁移,但给了我这个错误:
rake db:migrate == CreateRequests: migrating ================================================= -- create_table(:requests) NOTICE: CREATE TABLE will create implicit sequence "requests_id_seq1" for serial column "requests.id" rake aborted! An error has occurred, this and all later migrations canceled: PG::Error: ERROR: relation "requests" already exists : CREATE TABLE "requests" ("id" serial primary key, "title" character varying(255), "content" text, "category" character varying(255), "status" character varying(255), "requested_track_id" integer, "created_at" timestamp, "updated_at" timestamp)
有任何想法吗?