class CreatePDocuments < ActiveRecord::Migration[6.0]
  def change
    create_table :p_documents do |t|
      t.string :element_type
      t.integer :element_id
      t.references :p_document_type, index: true, foreign_key: true
      t.integer :particular_bill_id
      t.integer :particular_send_id
      t.string :name
      t.string :d_number
      t.integer :d_index
      t.integer :d_year
      t.string :d_prefix
      t.string :label
      t.text :header
      t.text :footer
      t.integer :image_file_id
      t.integer :data_file_id
      t.string :token
      

      t.timestamps null: false
    end
  end
end
