Skip to content

Commit 0167af0

Browse files
committed
working on porting data
1 parent 6c42c8d commit 0167af0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/tasks/db.rake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@ namespace :db do
151151
end
152152

153153
def port_data_since
154-
["created_at > ? OR updated_at > ?", 2.day.ago, 2.day.ago]
154+
# OR updated_at > ?
155+
["created_at > ?", 2.day.ago]
155156
end
156157

157158
task :users => :connect do
158159
User.reset_pk_sequence
159160
# puts Legacy[:users].where("created_at >= ?", 2.days.ago).count
160-
Legacy[:users].where("created_at >= ?", 2.days.ago).each do |row|
161+
Legacy[:users].where(port_data_since).each do |row|
162+
puts row[:username]
161163
begin
162164
user = User.find_or_initialize_by_id(row[:id])
163165
user.attributes.keys.each do |key|

0 commit comments

Comments
 (0)