Sha256: ffc62a80b8b30b9faa1ba14e42a5caa1e430fe7b7f4020e593ce66daf0567d0e

Contents?: true

Size: 1.18 KB

Versions: 13

Compression:

Stored size: 1.18 KB

Contents

class CreateUnidomScoreSheets < ActiveRecord::Migration

  def change

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

      t.references :template,     type: :uuid, null: true
      t.references :scorer,       type: :uuid, null: false,
        polymorphic: { null: false, default: '', limit: 200 }
      t.references :score_keeper, type: :uuid, null: false,
        polymorphic: { null: false, default: '', limit: 200 }

      t.string  :name,      null: true,  default: nil, limit:     200
      t.decimal :score,     null: false, default: 0.0, precision: 12, scale: 2
      t.date    :scored_on, null: false

      t.text :description
      t.text :instruction

      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_score_sheets, :template_id
    add_index :unidom_score_sheets, :scorer_id
    add_index :unidom_score_sheets, :score_keeper_id

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
unidom-score-1.1.7 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1.6 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1.5 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1.4 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1.3 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1.2 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1.1 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.1 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.0.2 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.0.1 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-1.0 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-0.4.1 db/migrate/20060111000000_create_unidom_score_sheets.rb
unidom-score-0.4 db/migrate/20060111000000_create_unidom_score_sheets.rb