僕がやったこと
まずrelationという中間テーブルを作りました。
そして、マイグレーションしたと思います。
がしかし、中間テーブルの名前をfavoriteにしたくてfavorite中間テーブルを作りました。
その後マイグレーションしました
出たエラーfavorite中間テーブルをマイグレーションした時に出たものです。)
Column user_id on table relations does not match column id on users, which has type bigint(20). To resolve this issue, change the type of the user_id column on relations to be :bigint. (For example t.bigint :user_id).
Original message: Mysql2::Error: Can't create table 'microposts_development.relations' (errno: 150): CREATE TABLE relations (id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id bigint, favorite_id bigint, created_at datetime NOT NULL, updated_at datetime NOT NULL, INDEX index_relations_on_user_id (user_id), INDEX index_relations_on_favorite_id (favorite_id), CONSTRAINT fk_rails_8231c41d73
FOREIGN KEY (user_id)
REFERENCES users (id)
, CONSTRAINT fk_rails_917ef5ebd7
FOREIGN KEY (favorite_id)
REFERENCES favorites (id)
僕はrelation中間テーブルをmysqlにアクセスして消そうと思ったんですが中間テーブルがどちらも(favorite,relation)show tables;をしても
出てきません。
質問をまとめると、中間テーブルを消す方法を教えてください。