Sha256: e7978109fb68d4656460ea1b331a76721de962f8764eb261097a9ed154dd6ef7

Contents?: true

Size: 850 Bytes

Versions: 24

Compression:

Stored size: 850 Bytes

Contents

class CreateUnidomCategorizings < ActiveRecord::Migration

  def change

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

      t.references :category,    type: :uuid, null: false
      t.references :categorized, type: :uuid, null: false,
        polymorphic: { type: :uuid, null: false }

      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_categorizings, :category_id
    add_index :unidom_categorizings, :categorized_id

  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
unidom-category-1.0 db/migrate/20000304000000_create_unidom_categorizings.rb
unidom-category-0.3 db/migrate/20000304000000_create_unidom_categorizings.rb
unidom-category-0.2 db/migrate/20000304000000_create_unidom_categorizings.rb
unidom-category-0.1 db/migrate/20000304000000_create_unidom_categorizings.rb