forked from Gitlink/forgeplus
add column to statistics
This commit is contained in:
parent
13263a44e4
commit
fc3f50a2bf
|
@ -837,6 +837,12 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
private
|
||||
def update_last_login_on
|
||||
if current_user.logged?
|
||||
current_user.update_column(:last_login_on, Time.now)
|
||||
end
|
||||
end
|
||||
|
||||
def object_not_found
|
||||
uid_logger("Missing template or cant't find record, responding with 404")
|
||||
render json: {message: "您访问的页面不存在或已被删除", status: 404}
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
# type :integer
|
||||
# status :integer
|
||||
# conflicted_files :text(65535)
|
||||
# commits_ahead :integer
|
||||
# commits_behind :integer
|
||||
# changed_protected_files :text(65535)
|
||||
# issue_id :integer
|
||||
# index :integer
|
||||
# head_repo_id :integer
|
||||
|
@ -20,6 +17,11 @@
|
|||
# merged_commit_id :string(40)
|
||||
# merger_id :integer
|
||||
# merged_unix :integer
|
||||
# commits_ahead :integer
|
||||
# commits_behind :integer
|
||||
# changed_protected_files :text(65535)
|
||||
# commit_num :integer
|
||||
# changed_files :integer
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
|
|
@ -6,19 +6,21 @@
|
|||
# repo_id :integer
|
||||
# org_id :integer
|
||||
# url :text(65535)
|
||||
# signature :text(65535)
|
||||
# http_method :string(255)
|
||||
# content_type :integer
|
||||
# secret :text(65535)
|
||||
# events :text(65535)
|
||||
# is_ssl :boolean
|
||||
# is_active :boolean
|
||||
# hook_task_type :integer
|
||||
# meta :text(65535)
|
||||
# last_status :integer
|
||||
# created_unix :integer
|
||||
# updated_unix :integer
|
||||
# is_system_webhook :boolean default("0"), not null
|
||||
# type :string(16)
|
||||
# branch_filter :text(65535)
|
||||
# signature :text(65535)
|
||||
# is_ssl :boolean
|
||||
# hook_task_type :integer
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
# repo_id :integer
|
||||
# hook_id :integer
|
||||
# uuid :string(255)
|
||||
# type :integer
|
||||
# url :text(65535)
|
||||
# signature :text(65535)
|
||||
# payload_content :text(65535)
|
||||
# http_method :string(255)
|
||||
# content_type :integer
|
||||
# event_type :string(255)
|
||||
# is_ssl :boolean
|
||||
# is_delivered :boolean
|
||||
# delivered :integer
|
||||
# is_succeed :boolean
|
||||
# request_content :text(65535)
|
||||
# response_content :text(65535)
|
||||
# type :string(255)
|
||||
# url :text(65535)
|
||||
# signature :text(65535)
|
||||
# http_method :string(255)
|
||||
# content_type :integer
|
||||
# is_ssl :boolean
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
# dau :integer
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# wau :integer
|
||||
# mau :integer
|
||||
#
|
||||
|
||||
class Statistic < ApplicationRecord
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
class AddColumnToStatistics < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :statistics, :wau, :integer
|
||||
add_column :statistics, :mau, :integer
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue