Sha256: ef01e8e8977a4042936777825c3ccf34d5e451a364e46d63e9a35683aff992a8

Contents?: true

Size: 866 Bytes

Versions: 41

Compression:

Stored size: 866 Bytes

Contents

class CreateUnidomIdentificatings < ActiveRecord::Migration

  def change

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

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

      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_identificatings, :identity_id
    add_index :unidom_identificatings, :visitor_id

  end

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
unidom-visitor-0.1 db/migrate/20000201000000_create_unidom_identificatings.rb