Commit 9f066363a35e241f3272a58d465a786a4a88ba63

Authored by Larissa Reis
1 parent fc342636

Fixing position field in migrations

plugins/custom_forms/db/migrate/20130823135600_add_select_field_type_to_custom_forms_plugin_fields.rb
1 1 class AddSelectFieldTypeToCustomFormsPluginFields < ActiveRecord::Migration
2 2 def self.up
3 3 change_table :custom_forms_plugin_fields do |t|
4   - t.remove :position
5 4 t.string :select_field_type
6 5 end
7 6  
... ...
plugins/custom_forms/db/migrate/20131107050913_add_position_to_field_and_alternatives.rb
1 1 class AddPositionToFieldAndAlternatives < ActiveRecord::Migration
2 2 def self.up
3   - change_table :custom_forms_plugin_fields do |t|
4   - t.integer :position, :default => 0
5   - end
6   -
7 3 change_table :custom_forms_plugin_alternatives do |t|
8 4 t.integer :position, :default => 0
9 5 end
... ... @@ -20,10 +16,6 @@ class AddPositionToFieldAndAlternatives &lt; ActiveRecord::Migration
20 16 end
21 17  
22 18 def self.down
23   - change_table :custom_forms_plugin_fields do |t|
24   - t.remove :position
25   - end
26   -
27 19 change_table :custom_forms_plugin_alternatives do |t|
28 20 t.remove :position
29 21 end
... ...