Sha256: 408033aa82d1d883112677f9dbbb53ddcaf21a27ea894cf793b1f1af5e5dd2fd

Contents?: true

Size: 381 Bytes

Versions: 2

Compression:

Stored size: 381 Bytes

Contents

class AddPublishedToSimplecSubdomains < ActiveRecord::Migration[5.1]
  def change
    add_column :simplec_subdomains, :published, :boolean,
      default: false
    add_index :simplec_subdomains, :published

    reversible do |dir|
      dir.up {
        execute <<-SQL.strip.gsub(/\s+/, ' ')
UPDATE simplec_subdomains
  SET published = true;
        SQL
      }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simplec-0.10.1 db/migrate/20180608205153_add_published_to_simplec_subdomains.rb
simplec-0.10.0 db/migrate/20180608205153_add_published_to_simplec_subdomains.rb