summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-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