CREATE TABLE people (
  id SERIAL,
  name varchar(50) NOT NULL default '',
  street1 varchar(70) NOT NULL default '',
  street2 varchar(70) NOT NULL default '',
  city varchar(70) NOT NULL default '',
  state char(2) NOT NULL default '',
  zip varchar(10) NOT NULL default '',
  CONSTRAINT pk_people_id PRIMARY KEY(id)
);

CREATE INDEX idx_people_name ON people(name);

INSERT INTO people 
VALUES (1, 'Superman', '123 Somewhere', '', 'Smallville', 'KS', '123456');
*Make sure you have the "Ruby PostgreSQL adapter":http://www.postgresql.jp/interfaces/ruby/ installed* change the adapter lines in config/database.yml to:
adapter: postgresql
Go on to TutorialStepTwo | Return to TutorialStepOne | [[Tutorial]] category:Tutorial