On Tuesday, January 10, 2017 at 6:40:19 AM UTC-8, Larry Vincent wrote: > > I am building a project in Padrino using the Sequel adapter. I have a > many-to-many relationship between two tables, defined in each model. When I > try to create records by using the model.add_associated-model method I get > an error message saying that the model_associated-model table does not > exist. When I examine the schema in my database, the join table isn't > there. I have tried resetting the database with the sq:reset method and run > through my migrations but nothing works. Do I need to explicitly create the > join table? I thought the migrate task would do that. >
Yes, you need to explicit create the join table in a migration, just like you need to explicit create the model tables. Models and model-level configuration (such as associations) never modify the database schema. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
