mirror of
https://github.com/anteo/redmine_custom_workflows.git
synced 2026-01-26 08:14:20 +00:00
Fixed migrations, making all them reversible, so it's possible to uninstall plugin now by rake redmine:plugins:migrate NAME=redmine_custom_workflows VERSION=0
This commit is contained in:
parent
a781bee2c8
commit
f25070e589
@ -90,6 +90,7 @@ class CustomWorkflow < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def validate_syntax
|
def validate_syntax
|
||||||
|
return unless respond_to? :observable
|
||||||
case observable
|
case observable
|
||||||
when 'shared'
|
when 'shared'
|
||||||
CustomWorkflow.run_shared_code(self)
|
CustomWorkflow.run_shared_code(self)
|
||||||
|
|||||||
@ -8,6 +8,5 @@ class AlterCustomWorkflows < ActiveRecord::Migration
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
raise ActiveRecord::IrreversibleMigration
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -4,6 +4,5 @@ class ChangeCustomWorkflowsDescriptionType < ActiveRecord::Migration
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
change_column :custom_workflows, :description, :string, :null => false, :default => ''
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
class SetPositionFieldNullable < ActiveRecord::Migration
|
class SetPositionFieldNullable < ActiveRecord::Migration
|
||||||
def change
|
def up
|
||||||
change_column :custom_workflows, :position, :integer, :null => true
|
change_column :custom_workflows, :position, :integer, :null => true
|
||||||
end
|
end
|
||||||
|
def down
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user