Hi, Im using locomotive and running SQLight. Im confused about making tables with sqlight. Im following the depot example from ''agile web development with rails''. When trying to make the table ''products'' is there a difference when using SQLight rather than MySQL? Here is the DDL for MySQL, how do I make this table with SQLight? - drop table if exists products; create table products ( id int not null auto_increment, title varchar(100) not null, description text not null, image_url varchar(200) not null, price decimal(10,2) not null, primary key (id) ); - Also am I right in thinking this should go directly into my addproductstable? Basically if someone can explain to me the steps I need to do to make tables in SQLight! Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
if you were to use rails migrations you wouldn''t have to worry about it database specific language. Chris On 1/20/07, cmcfarland <cmcfarland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, Im using locomotive and running SQLight. Im confused about making > tables with sqlight. > > Im following the depot example from ''agile web development with rails''. > When trying to make the table ''products'' is there a difference when > using SQLight rather than MySQL? > > Here is the DDL for MySQL, how do I make this table with SQLight? > > - > > drop table if exists products; > create table products ( > id int not null auto_increment, > title varchar(100) not null, > description text not null, > image_url varchar(200) not null, > price decimal(10,2) not null, > primary key (id) > ); > > - > > Also am I right in thinking this should go directly into my > addproductstable? > > Basically if someone can explain to me the steps I need to do to make > tables in SQLight! > > Thanks in advance. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
augustlilleaas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-20 19:00 UTC
Re: Making tables with SQLight
The first version of the agile book is very very outdated, rails hove along pretty fast. Do migrations instead. Write the scremas in ruby and make rails deal with the sql. http://wiki.rubyonrails.com/rails/pages/UsingMigrations http://wiki.rubyonrails.com/rails/pages/HowToUseMigrations http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations On Jan 20, 5:45 pm, "Chris Hall" <christopher.k.h...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> if you were to use rails migrations you wouldn''t have to worry about > it database specific language. > > Chris > > On 1/20/07, cmcfarland <cmcfarl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, Im using locomotive and running SQLight. Im confused about making > > tables with sqlight. > > > Im following the depot example from ''agile web development with rails''. > > When trying to make the table ''products'' is there a difference when > > using SQLight rather than MySQL? > > > Here is the DDL for MySQL, how do I make this table with SQLight? > > > - > > > drop table if exists products; > > create table products ( > > id int not null auto_increment, > > title varchar(100) not null, > > description text not null, > > image_url varchar(200) not null, > > price decimal(10,2) not null, > > primary key (id) > > ); > > > - > > > Also am I right in thinking this should go directly into my > > addproductstable? > > > Basically if someone can explain to me the steps I need to do to make > > tables in SQLight! > > > Thanks in advance.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for your help. This is alot better! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---