summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-03 18:45:59 +0100
committerspag <spag@golwen.net>2013-02-03 18:45:59 +0100
commit8ba73e0d84c74e22ee91dcdd7c855514d0dd0e99 (patch)
tree7be4dc84ac0f9fb1ae2d6995cd03bf4b2e9e1d99 /db/migrate
parent7eaa39014d7934e8cc19001dc0da95095a73a632 (diff)
remove_perimeter_parameters migration added
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20130203164500_remove_perimeter_parameters.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20130203164500_remove_perimeter_parameters.rb b/db/migrate/20130203164500_remove_perimeter_parameters.rb
new file mode 100644
index 0000000..15838bb
--- /dev/null
+++ b/db/migrate/20130203164500_remove_perimeter_parameters.rb
@@ -0,0 +1,10 @@
+class StartPerimeterDefense < ActiveRecord::Migration
+ def up
+ module_index = GsParameter.where(:entity => 'events', :section => 'modules').all.count + 1;
+ GsParameter.create(:entity => 'events', :section => 'modules', :name => 'perimeter_defense', :value => module_index, :class_type => 'Integer')
+ end
+
+ def down
+ GsParameter.where(:entity => 'events', :section => 'modules', :name => 'perimeter_defense').destroy_all
+ end
+end