On 22 Jan, 17:04, Jeremy Evans <[email protected]> wrote: > > class One < Sequel::Model(Sequel.sqlite('one.db')[:ones]) > self.set_schema do > primary_key :oid > text :c1 > text :c2 > text :c3 > end > self.create_table unless self.table_exists? > end > > class Two < Sequel::Model(Sequel.sqlite('two.db')[:twos]) > self.set_schema do > primary_key :oid > text :c1 > text :c2 > text :c3 > end > self.create_table unless self.table_exists? > end
Thanks for the explanation. Your code looks much cleaner than my original code (though the syntax feels a bit esoteric to me). > > BTW, I don't recommend using Model.set_schema and Model.create_table > except in test or example code. If this is for a production > deployment, use migrations. Yes, I know. I've mostly used Og as my primary ORM the past three years or so, so I'm pretty stuck in the way I define my models. But i'll probably use migrations eventually. Kindly /lasso --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
