add exported_columns to export template model
Co-authored-by: mfo <mfo@users.noreply.github.com>
This commit is contained in:
parent
b2c3887520
commit
94b3655ff7
3 changed files with 10 additions and 0 deletions
|
@ -15,6 +15,8 @@ class ExportTemplate < ApplicationRecord
|
|||
attribute :export_pdf, :export_item
|
||||
attribute :pjs, :export_item, array: true
|
||||
|
||||
attribute :exported_columns, :exported_column, array: true
|
||||
|
||||
before_validation :ensure_pjs_are_legit
|
||||
|
||||
validates_with ExportTemplateValidator
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddColumnsToExportTemplate < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_column :export_templates, :exported_columns, :jsonb, array: true, default: [], null: false
|
||||
end
|
||||
end
|
|
@ -626,6 +626,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_11_12_090128) do
|
|||
t.datetime "created_at", null: false
|
||||
t.jsonb "dossier_folder", null: false
|
||||
t.jsonb "export_pdf", null: false
|
||||
t.jsonb "exported_columns", default: [], null: false, array: true
|
||||
t.bigint "groupe_instructeur_id", null: false
|
||||
t.string "kind", null: false
|
||||
t.string "name", null: false
|
||||
|
|
Loading…
Reference in a new issue