Browse Source

ADD some columns for project_educoders table

tags/v1.0.0
Jasder 5 years ago
parent
commit
f5eecdffdc
2 changed files with 8 additions and 0 deletions
  1. +2
    -0
      app/jobs/sync_educoder_shixun_job.rb
  2. +6
    -0
      db/migrate/20201020093834_add_forked_count_and_commit_count_to_project_educoders.rb

+ 2
- 0
app/jobs/sync_educoder_shixun_job.rb View File

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


repo = Repository.new(repo_params) repo = Repository.new(repo_params)


+ 6
- 0
db/migrate/20201020093834_add_forked_count_and_commit_count_to_project_educoders.rb 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

Loading…
Cancel
Save