bosko / rmre

Rails 3 models reverse engineering
MIT License
126 stars 36 forks source link

Handle primary keys creation during table migration #8

Open bosko opened 12 years ago

bosko commented 12 years ago

When table is created and columns are added ActiveRecord automatically adds primary column to the table. This makes problems on legacy databases where, for example, primary column name is OID and table has column ID. Since ActiveRecord creates primary key according to convention column ID exists at the time we are trying to add new column and error occurs.