2013-05-10 3 views
0

MYSQL 데이터베이스를 postgreSQL으로 변환하려고하면 heroku와 잘 작동합니다. 나는 보석 mysql2psql을 설치하고 그것을 실행했다. 내가 그것을 실행하면, 내가 페이지에서 오전 경우 나는MYSQL에서 postgreSQL 문제로 마이그레이션

mysql2psql 
Creating table breads... 
Created table breads 
Creating table sammiches... 
Created table sammiches 
Creating table schema_migrations... 
Created table schema_migrations 
Counting rows of breads... 
Rows counted 
Loading breads... 

33 rows loaded in 0min 0s 
Counting rows of sammiches... 
Rows counted 
Loading sammiches... 

161 rows loaded in 0min 0s 
Counting rows of schema_migrations... 
Rows counted 
Loading schema_migrations... 

4 rows loaded in 0min 0s 
Indexing table breads... 
Indexed table breads 
Indexing table sammiches... 
Indexed table sammiches 
Indexing table schema_migrations... 
Indexed table schema_migrations 
Table creation 0 min, loading 0 min, indexing 0 min, total 0 min 

... 수 ... psql의 난 쿼리를 실행할 수 있습니다 나는 열이 테이블에 제대로 가져올 것을 알고 있지만 항목이 없습니다

나는

heroku rake db:migrate 
WARNING: `heroku rake` has been deprecated. Please use `heroku run rake` instead. 
Running `rake db:migrate` attached to terminal... up, run.6669 
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7) 
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7) 
Connecting to database specified by DATABASE_URL 
Migrating to CreateSammiches (20130428211616) 

를 점프는 - 시도하지만 여전히 비어 있습니다. 빈 축 번호

dbl77pdgmr9l10=> select * from sammiches;                              id | name | image | country | description | created_at | updated_at 
----+------+-------+---------+-------------+------------+------------ 
(0 rows) 

dbl77pdgmr9l10=> 

아이디어가 있으십니까? 감사!

당신이 데이터 구조를 알고 있다면 mysql2psql 파일 -

mysql: 
hostname: localhost 
port: 3306 
socket: /tmp/mysql.sock 
username: root 
password: #### 
database: sandwich_development 

destination: 
# if file is given, output goes to file, else postgres 
file: 
postgres: 
    hostname: localhost 
    port: 5432 
    username: root 
    password: 
    database: pgmysql_db 

# if tables is given, only the listed tables will be converted. leave empty to convert all tables. 
#tables: 
#- table1 
#- table2 
# if exclude_tables is given, exclude the listed tables from the conversion. 
#exclude_tables: 
#- table3 
#- table4 


# if supress_data is true, only the schema definition will be exported/migrated, and not the data 
supress_data: false 

# if supress_ddl is true, only the data will be exported/imported, and not the schema 
supress_ddl: false 

# if force_truncate is true, forces a table truncate before table loading 
force_truncate: false 
+0

을 확인, 무엇을 중지 당신 자신의 변환기를 쓰고 있습니까? –

답변

1

suppress_data: true 

데이터를 이동하지 수 있습니다 귀하의 database.yaml 구성 만 스키마

+0

흠, false로 설정됩니다. 감사! – DynastySS

+0

mysqlpsql yml 파일을 추가했습니다. – DynastySS

+0

파일로 덤프를 시도하여 기존 데이터에 대한 삽입 문이 포스트 그레스가 아닌 직접 있는지 확인하십시오. – mconlin

관련 문제