| From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Cc: | Bryan Nelson <shrek(at)shreks-place(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Subject: | Re: Error Importing CSV File | 
| Date: | 2011-07-15 17:57:51 | 
| Message-ID: | 201107151057.51875.adrian.klaver@gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Friday, July 15, 2011 10:33:34 am Bryan Nelson wrote:
> Tom, the file was created in linunx and is utf-8.  Here is the rake
> task that created the table:
> 
> class CreateGeoData < ActiveRecord::Migration
ActiveRecord will add an auto-incrementing id column to the table. You will need 
to look at the actual table in the database.
>   def self.up
>     create_table :geo_data do |t|
>       t.column :zip_code, :text
>       t.column :latitude, :float8
>       t.column :longitude, :float8
>       t.column :city, :text
>       t.column :state, :text
>       t.column :county, :text
>     end
>     add_index "geo_data", ["zip_code"], :name => "zip_code_optimization"
>   end
> 
>   def self.down
>     drop_table :geo_data
> 
>   end
> end
-- 
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James B. Byrne | 2011-07-15 18:13:46 | Re: Error Importing CSV File | 
| Previous Message | Bryan Nelson | 2011-07-15 17:57:03 | Re: Error Importing CSV File |