Sha256: c5febe04ea2c09d8715c153026be99e877520c026d87e9efdaf350a629caf15c

Contents?: true

Size: 882 Bytes

Versions: 42

Compression:

Stored size: 882 Bytes

Contents

# frozen_string_literal: true

require 'thredded/base_migration'

class UpgradeThreddedV010ToV011 < Thredded::BaseMigration
  def up
    drop_table :thredded_post_notifications
    add_column :thredded_user_preferences, :auto_follow_topics, :boolean, default: false, null: false
    add_column :thredded_user_messageboard_preferences, :auto_follow_topics, :boolean, default: false, null: false
  end

  def down
    remove_column :thredded_user_messageboard_preferences, :auto_follow_topics
    remove_column :thredded_user_preferences, :auto_follow_topics
    create_table :thredded_post_notifications do |t|
      t.string :email, limit: 191, null: false
      t.references :post, null: false, index: false
      t.timestamps null: false
      t.string :post_type, limit: 191
      t.index %i[post_id post_type], name: :index_thredded_post_notifications_on_post
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
thredded-1.1.0 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-1.0.1 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-1.0.0 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.16 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.15 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.14 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.13 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.12 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.11 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.10 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.9 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.8 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.7 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.6 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.5 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.4 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.3 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.1 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.16.0 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
thredded-0.15.5 db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb