Forum: Ruby on Rails Making tables with SQLight

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
079efada3238c751f9851ccfed081120?d=identicon&s=25 cmcfarland (Guest)
on 2007-01-20 16:54
(Received via mailing list)
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.
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (au5lander)
on 2007-01-20 17:45
(Received via mailing list)
if you were to use rails migrations you wouldn't have to worry about
it database specific language.

Chris
70ca58d0e0e0eabbdb74d177417d09d7?d=identicon&s=25 augustlilleaas@gmail.com (Guest)
on 2007-01-20 20:21
(Received via mailing list)
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/Understand...
079efada3238c751f9851ccfed081120?d=identicon&s=25 cmcfarland (Guest)
on 2007-01-22 12:02
(Received via mailing list)
Thanks for your help. This is alot better!
This topic is locked and can not be replied to.