Sha256: 9bce59d501d9244c848d738ce03c13d8f97c216eee9a45cbd46215578cd936b4

Contents?: true

Size: 1.51 KB

Versions: 2

Compression:

Stored size: 1.51 KB

Contents

class CreateUnidomSearchings < ActiveRecord::Migration

  def change

    create_table :unidom_searchings, id: :uuid do |t|

      t.references :searcher_visitor, type: :uuid, null: true,
        polymorphic: { null: true, default: nil, limit: 200 }
      t.references :searcher_party,   type: :uuid, null: true,
        polymorphic: { null: true, default: nil, limit: 200 }
      t.references :reason,           type: :uuid, null: true

      t.string  :resource_name,    null: false, default: '', limit: 200
      t.string  :platform_name,    null: false, default: '', limit: 200
      t.integer :platform_version, null: false, default: 1

      t.jsonb   :criteria,     null: false, default: {}
      t.integer :found_count,  null: false, default: 0, limit: 8
      t.integer :shown_count,  null: false, default: 0
      t.integer :per_page,     null: false, default: 0
      t.integer :total_pages,  null: false, default: 0
      t.integer :current_page, null: false, default: 1

      t.column   :state, 'char(1)', null: false, default: 'C'
      t.datetime :opened_at,        null: false, default: Unidom::Common::OPENED_AT
      t.datetime :closed_at,        null: false, default: Unidom::Common::CLOSED_AT
      t.boolean  :defunct,          null: false, default: false
      t.jsonb    :notation,         null: false, default: {}

      t.timestamps null: false

    end

    add_index :unidom_searchings, :searcher_visitor_id
    add_index :unidom_searchings, :searcher_party_id
    add_index :unidom_searchings, :reason_id

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
unidom-action-2.0 db/migrate/20000513000000_create_unidom_searchings.rb
unidom-action-1.17.18 db/migrate/20000513000000_create_unidom_searchings.rb