sqlite3 db を Postgresql に移行しようとしています (Railscasts #342 に従っていますが、ubuntu を使用しています)。rake db:create:all
私のデータベースの後、aperitime_development
タップでSinatraサーバーを開始しました(mi sqlite3 dbをプッシュするため)が、実行しようとすると
taps pull postgres://willy:piero@localhost/aperitime_development http://willy:ciao@localhost:5000'
データが postgres db にコピーされず、コンソールが正しく終了しません:
Receiving schema
Schema: 0% | | ETA: --:--:--
Schema: 25% |========== | ETA: 00:00:07
Schema: 50% |===================== | ETA: 00:00:03
Schema: 75% |=============================== | ETA: 00:00:01
Schema: 100% |==========================================| Time: 00:00:04
Receiving data
4 tables, 800 records
/usr/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in 'async_exec': PG::Error: ERROR: integer out of range (Sequel::DatabaseError)
from /usr/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block (2 levels) in execute'
from /usr/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in `log_yield'
from /usr/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block in execute'
from /usr/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:158:in `check_disconnect_errors'
from /usr/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `execute'
そしてエラーが続きます。
何か案は?
それが私のdatabase.ymlです
development:
adapter: postgresql
encoding: unicode
database: aperitime_development
pool: 5
username: willy
password: piero
test:
adapter: postgresql
encoding: unicode
database: aperitime_test
pool: 5
username: willy
password: piero
ここに私のschema.rbがあります
ActiveRecord::Schema.define(:version => 20120630154954) do
create_table "locals", :force => true do |t|
t.string "nome"
t.string "indirizzo"
t.text "descrizione"
t.integer "Tel", :limit => 8
t.integer "voto"
t.string "mappa"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
t.string "nome"
t.string "email"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "password_digest"
t.string "remember_token"
t.boolean "admin", :default => false
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["remember_token"], :name => "index_users_on_remember_token"
end