Search Postgresql Archives

Re: Error Importing CSV File

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux