summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-03 18:46:22 +0100
committerspag <spag@golwen.net>2013-02-03 18:46:22 +0100
commitb8576b59e912905f3e30e0d69ca2d4df013bc313 (patch)
tree2df911e4fde352ec0ccd1e88427e14ed9705906b
parent8ba73e0d84c74e22ee91dcdd7c855514d0dd0e99 (diff)
start perimeter migration added
-rw-r--r--db/migrate/20130203174300_start_perimeter_defense.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20130203174300_start_perimeter_defense.rb b/db/migrate/20130203174300_start_perimeter_defense.rb
new file mode 100644
index 0000000..15838bb
--- /dev/null
+++ b/db/migrate/20130203174300_start_perimeter_defense.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