Sha256: d806a594c7b02ec52e347391f988ccaf71f50ae90adbb4339a95223a219b7b6b

Contents?: true

Size: 606 Bytes

Versions: 8

Compression:

Stored size: 606 Bytes

Contents

class CreateComparisons < Sequel::Migration
  def up
    create_table :comparisons do
      primary_key :id
      Integer :matcher_id
      Integer :matcher_version
      Integer :field_1_id
      Integer :field_2_id
      Time :created_at
      Time :updated_at
    end

    [:matchers, :matchers_versions].each do |name|
      alter_table(name) do
        drop_column :comparator_options
      end
    end
  end

  def down
    [:matchers, :matchers_versions].each do |name|
      alter_table(name) do
        add_column :comparator_options, :text
      end
    end
    drop_table :comparisons
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coupler-0.0.9-java db/migrate/004_create_comparisons.rb
coupler-0.0.8-java db/migrate/004_create_comparisons.rb
coupler-0.0.7-java db/migrate/004_create_comparisons.rb
coupler-0.0.6-java db/migrate/004_create_comparisons.rb
coupler-0.0.4-java db/migrate/004_create_comparisons.rb
coupler-0.0.3-java db/migrate/004_create_comparisons.rb
coupler-0.0.2-java db/migrate/004_create_comparisons.rb
coupler-0.0.1-java db/migrate/004_create_comparisons.rb