ADD some columns for project_educoders table

This commit is contained in:
Jasder 2020-10-20 17:43:03 +08:00
parent 2eca095608
commit f5eecdffdc
2 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,8 @@ class SyncEducoderShixunJob < ApplicationJob
project_id: project.id,
owner: re['username'],
repo_name: re['repo_name'],
forked_count: re['forked_count'],
commit_count: re['commit_count'],
image_url: re['image_url'])
repo = Repository.new(repo_params)

View File

@ -0,0 +1,6 @@
class AddForkedCountAndCommitCountToProjectEducoders < ActiveRecord::Migration[5.2]
def change
add_column :project_educoders, :commit_count, :integer, default: 0
add_column :project_educoders, :forked_count, :integer, default: 0
end
end