Sha256: 73f6017f55e927e17b8e0727e1d9a85d5101e45109c75f6d475ca30f231b2af5

Contents?: true

Size: 914 Bytes

Versions: 41

Compression:

Stored size: 914 Bytes

Contents

class CreateUnidomRecognizations < ActiveRecord::Migration

  def change

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

      t.references :visitor, type: :uuid, null: false,
        polymorphic: { null: false, default: '', limit: 200 }
      t.references :party,   type: :uuid, null: false,
        polymorphic: { null: false, default: '', limit: 200 }

      t.boolean :elemental, null: false, default: false

      t.column   :state, 'char(1)', null: false, default: 'C'
      t.datetime :opened_at,        null: false, default: ::Time.utc(1970)
      t.datetime :closed_at,        null: false, default: ::Time.utc(3000)
      t.boolean  :defunct,          null: false, default: false
      t.jsonb    :notation,         null: false, default: {}

      t.timestamps null: false

    end

    add_index :unidom_recognizations, :visitor_id
    add_index :unidom_recognizations, :party_id

  end

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
unidom-visitor-0.1 db/migrate/20000203000000_create_unidom_recognizations.rb