Update projects sime api with statics

This commit is contained in:
Jasder
2020-10-21 11:45:55 +08:00
parent ca3b5f4284
commit e3d9dae8fd
10 changed files with 62 additions and 24 deletions

View File

@@ -0,0 +1,12 @@
class CreateProjectStatistics < ActiveRecord::Migration[5.2]
def change
create_table :project_statistics do |t|
t.integer :common_projects_count, :default => 0
t.integer :mirror_projects_count, :default => 0
t.integer :sync_mirror_projects_count, :default => 0
t.integer :commits_total_count, :default => 0
t.timestamps
end
end
end

View File

@@ -0,0 +1,5 @@
class AddIndexForProjectTypeToProjects < ActiveRecord::Migration[5.2]
def change
add_index :projects, :project_type
end
end