demarches-normaliennes/db/migrate/20201002124154_create_stats.rb

22 lines
729 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class CreateStats < ActiveRecord::Migration[6.0]
def change
create_table :stats do |t|
t.bigint :dossiers_not_brouillon, default: 0
t.bigint :dossiers_brouillon, default: 0
t.bigint :dossiers_en_construction, default: 0
t.bigint :dossiers_en_instruction, default: 0
t.bigint :dossiers_termines, default: 0
t.bigint :dossiers_depose_avant_30_jours, default: 0
t.bigint :dossiers_deposes_entre_60_et_30_jours, default: 0
2020-10-06 14:23:15 +02:00
t.bigint :administrations_partenaires, default: 0
t.jsonb :dossiers_cumulative, null: false, default: '{}'
t.jsonb :dossiers_in_the_last_4_months, null: false, default: '{}'
t.timestamps
end
end
end