Aspects imported correctly
This commit is contained in:
parent
1187c13170
commit
62486a17b6
2 changed files with 1 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ module DataConversion
|
|||
log "Importing aspects to main table..."
|
||||
Aspect.connection.execute <<-SQL
|
||||
INSERT INTO aspects
|
||||
SELECT mongo_aspects.* from mongo_aspects
|
||||
SELECT mongo_aspects.id, mongo_aspects.name, users.id, mongo_aspects.created_at, mongo_aspects.updated_at, mongo_aspects.mongo_id, mongo_aspects.user_mongo_id FROM mongo_aspects INNER JOIN users ON (users.mongo_id = mongo_aspects.user_mongo_id)
|
||||
SQL
|
||||
log "Imported #{Aspect.count} aspects."
|
||||
end
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ describe DataConversion::ImportToMysql do
|
|||
aspect.name.should == "generic"
|
||||
aspect.mongo_id.should == "4d2657e9cc8cb46033000006"
|
||||
aspect.user_mongo_id.should == "4d2657e9cc8cb46033000005"
|
||||
aspect.user_id.should == User.where(:mongo_id => aspect.user_mongo_id)
|
||||
end
|
||||
it "sets the relation column" do
|
||||
@migrator.process_raw_aspects
|
||||
|
|
|
|||
Loading…
Reference in a new issue