So I have an existing postgres database which gets populated by a python script. Now I am making a rails api which serves that data to a client. To my amusement all that I had to do is to create model classes and simply define relationships. No migration files, no schema, it just works. So a couple of questions.
- Am I right in saying that
schema.rbis only needed for creating the database? If I am not running any migrations in my rails app I don't need any schema or migration files at all? - I used to think that rails infers the names of model methods with the help of schema.rb . But it seems the only glue that ties ORM layer and the database is naming conventions? Are there any pitfalls I might be overlooking in doing things this way?