Class: RedmineActsAsTaggableOn::Migration

Inherits:
ActsAsTaggableOnMigration
  • Object
show all
Defined in:
lib/redmine_acts_as_taggable_on/migration.rb

Defined Under Namespace

Classes: SchemaMismatchError

Instance Method Summary collapse

Instance Method Details

#downObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/redmine_acts_as_taggable_on/migration.rb', line 17

def down
  enforce_declarations!

  if ok_to_go_down?
    super
  else
    say 'Not dropping "tags" and "taggings" because they\'re still needed by'
    say 'the following plugins:'
    plugins_still_using_tables.each { |p| say p.id, true }
  end
end

#upObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/redmine_acts_as_taggable_on/migration.rb', line 6

def up
  enforce_declarations!
  check_for_old_style_plugins

  if ok_to_go_up?
    super
  else
    say 'Not creating "tags" and "taggings" because they already exist'
  end
end