Sha256: 0200c88352a6b0fab8dd70567acff5b35e10d6a38c125063e70788d0ca3ad12f

Contents?: true

Size: 567 Bytes

Versions: 9

Compression:

Stored size: 567 Bytes

Contents

class PreventNullStickyAndLocked < ActiveRecord::Migration
  def up
    change_column_null :thredded_topics, :sticky, false, false
    change_column_null :thredded_topics, :locked, false, false
    change_column_null :thredded_topics, :posts_count, false, 0
    remove_column :thredded_topics, :attribs
  end

  def down
    add_column :thredded_topics, :attribs, :string, default: '[]'
    change_column_null :thredded_topics, :posts_count, true
    change_column_null :thredded_topics, :sticky, true
    change_column_null :thredded_topics, :locked, true
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
thredded-0.0.12 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.10 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.9 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.8 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.7 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.6 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.5 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.4 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb
thredded-0.0.3 db/migrate/20131005032727_prevent_null_sticky_and_locked.rb