阅读背景:

Ruby on Rails迁移具有主键和外键。

来源:互联网 

I am just starting ROR and making different tables for the SQLite database and am running into some trouble in relation to automatically generated id's of tables and foreign keys. To create my tables I used the "rails generate scaffold" command followed by the attributes that I needed. I went to the db/migrate directory and looked at what I had just defined. But I don't understand how I am supposed to explicitly reference foreign keys. I'm used to using Oracle so I'd normally do this process in the very first step during creation and be done with it already. I am just starting ROR and making different tab




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: