Sha256: 95bb8500fbed122960108a3c3b9d2ecf812f190e2102e5cc2d470c6fc4547019

Contents?: true

Size: 885 Bytes

Versions: 1

Compression:

Stored size: 885 Bytes

Contents

class CreateUnidomCategorySchemes < ActiveRecord::Migration[6.0]

  def change

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

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

      t.string  :name,       null: false, default: '', limit: 200
      t.boolean :using_code, null: false, default: false

      t.text :description

      t.column   :state, 'char(1)', null: false, default: Unidom::Common::STATE
      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_category_schemes, :owner_id

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-category-2.0.1 db/migrate/20000301000000_create_unidom_category_schemes.rb