Sha256: d93a0833dbf8916f4fbed15366bb614accdb851e5f27a5be173bb6f93d49a0a9

Contents?: true

Size: 902 Bytes

Versions: 11

Compression:

Stored size: 902 Bytes

Contents

class CreateUnidomScoreSheetTemplates < ActiveRecord::Migration

  def change

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

      t.references :subject, 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.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_sheet_templates, :subject_id

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
unidom-score-1.1.7 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1.6 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1.5 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1.4 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1.3 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1.2 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1.1 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.1 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.0.2 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.0.1 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb
unidom-score-1.0 db/migrate/20060101000000_create_unidom_score_sheet_templates.rb