Sha256: 129253c5bad446b235f1a30da97142e27792c853fb3b095e325309c217579cee

Contents?: true

Size: 362 Bytes

Versions: 8

Compression:

Stored size: 362 Bytes

Contents

Sequel.migration do
  up do
    [:fields, :fields_versions].each do |name|
      alter_table(name) { add_column(:is_generated, :boolean, :default => false) }
      self[name].update(:is_generated => false)
    end
  end

  down do
    alter_table(:fields) { drop_column(:is_generated) }
    alter_table(:fields_versions) { drop_column(:is_generated) }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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