Re: Error Importing CSV File - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Error Importing CSV File
Date
Msg-id 201107151057.51875.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: Error Importing CSV File  (Bryan Nelson <shrek@shreks-place.com>)
List 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.klaver@gmail.com

pgsql-general by date:

Previous
From: Bryan Nelson
Date:
Subject: Re: Error Importing CSV File
Next
From: Tom Lane
Date:
Subject: Re: Error Importing CSV File