5ae9a44aa1
The API get projects/:id/traffic/fetches allows user with write access to the repository to get the number of clones for the last 30 days.
18 lines
487 B
Ruby
18 lines
487 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateProjectDailyStatistics < ActiveRecord::Migration[5.0]
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
|
|
def change
|
|
create_table :project_daily_statistics, id: :bigserial do |t|
|
|
t.integer :project_id, null: false
|
|
t.integer :fetch_count, null: false
|
|
t.date :date
|
|
|
|
t.index [:project_id, :date], unique: true, order: { date: :desc }
|
|
t.foreign_key :projects, on_delete: :cascade
|
|
end
|
|
end
|
|
end
|