parent
e673540323
commit
747493993b
@ -0,0 +1,5 @@
|
|||||||
|
class AddCommitsCountToProjects < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :commits_count, :integer, default: 0
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,18 @@
|
|||||||
|
# #coding=utf-8
|
||||||
|
#
|
||||||
|
# namespace :projects do
|
||||||
|
# desc "sync some projects which just have sigle repository"
|
||||||
|
# task :commits_count => :environment do
|
||||||
|
# projects = Project.where("gpid is not null")
|
||||||
|
# puts projects.count
|
||||||
|
# projects.each do |project|
|
||||||
|
# unless project.gpid.nil?
|
||||||
|
# count =
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# task :delete_rep => :environment do
|
||||||
|
# end
|
||||||
|
# end
|
Loading…
Reference in new issue