I have a table with two columns employee_id and manager_id without primary key in Mysql. I have a setup a many-to-many relationship between Employee and Employee_Manager table.In order to update a record i need a primary key on Employee_Manager table.Hence, in rails how can generate a migration which add a comun to existing table id(primary key) and set row value for all records in existing table.
Aucun commentaire:
Enregistrer un commentaire