Sha256: 0b4e418237a2d25a2dbf49a84b8d039e9b1e1a71162f0c1d51d104b689a272b3

Contents?: true

Size: 804 Bytes

Versions: 1

Compression:

Stored size: 804 Bytes

Contents

class CreateUnidomCompanies < ActiveRecord::Migration

  def change

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

      t.string :name, null: false, default: '', limit: 200
      t.text   :description

      t.string   :slug,             null: false, default: nil, limit: 200
      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_companies, :name
    add_index :unidom_companies, :slug, unique: true

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-party-2.0 db/migrate/20010105000000_create_unidom_companies.rb