add_measures_column('variation_value_2')
add_measures_column('variation_value_3')
add_measures_column('variation_value_4')
- add_measures_column('variation_value_5')
+ add_measures_column('variation_value_5')
+
+ add_snapshots_columns()
end
+
+ ProjectMeasure.reset_column_information()
+ Snapshot.reset_column_information()
end
private
ProjectMeasure.reset_column_information()
end
end
+
+ def self.add_snapshots_columns()
+ Snapshot.reset_column_information()
+
+ add_period_column('period1_mode', :string, :null => true, :limit => 100)
+ add_period_column('period1_param', :string, :null => true, :limit => 100)
+ add_period_column('period1_date', :datetime, :null => true)
+
+ add_period_column('period2_mode', :string, :null => true, :limit => 100)
+ add_period_column('period2_param', :string, :null => true, :limit => 100)
+ add_period_column('period2_date', :datetime, :null => true)
+
+ add_period_column('period3_mode', :string, :null => true, :limit => 100)
+ add_period_column('period3_param', :string, :null => true, :limit => 100)
+ add_period_column('period3_date', :datetime, :null => true)
+
+ add_period_column('period4_mode', :string, :null => true, :limit => 100)
+ add_period_column('period4_param', :string, :null => true, :limit => 100)
+ add_period_column('period4_date', :datetime, :null => true)
+
+ add_period_column('period5_mode', :string, :null => true, :limit => 100)
+ add_period_column('period5_param', :string, :null => true, :limit => 100)
+ add_period_column('period5_date', :datetime, :null => true)
+ end
+
+ def self.add_period_column(name, type, options={})
+ unless Snapshot.column_names.include?(name)
+ add_column(:snapshots, name, type, options)
+ end
+ end
end