Why is "from" the preferred method? On Sat, Oct 21, 2017 at 11:44 AM, Jeremy Evans <[email protected]> wrote:
> On Friday, October 20, 2017 at 2:59:12 PM UTC-7, luka mušin wrote: >> >> I am wonder is it correct to insert data to tables within migrations like in >> this example: >> >> Sequel.migration do >> up do >> pool.db[:geometry_types].insert(name: 'Point') >> end >> >> down do >> pool.db[:geometry_types].truncate >> end >> end >> >> >> >> >> Or how you people solving this problem? >> > > Yes, it is fine to modify data in migrations. However, you probably want: > > up do > from(:geometry_types).insert(name: 'Point') > end > > down do > from(:geometry_types).truncate > end > > 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. > -- 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.
