Commit 9f066363a35e241f3272a58d465a786a4a88ba63
1 parent
fc342636
Exists in
master
and in
29 other branches
Fixing position field in migrations
Showing
2 changed files
with
0 additions
and
9 deletions
Show diff stats
plugins/custom_forms/db/migrate/20130823135600_add_select_field_type_to_custom_forms_plugin_fields.rb
1 | class AddSelectFieldTypeToCustomFormsPluginFields < ActiveRecord::Migration | 1 | class AddSelectFieldTypeToCustomFormsPluginFields < ActiveRecord::Migration |
2 | def self.up | 2 | def self.up |
3 | change_table :custom_forms_plugin_fields do |t| | 3 | change_table :custom_forms_plugin_fields do |t| |
4 | - t.remove :position | ||
5 | t.string :select_field_type | 4 | t.string :select_field_type |
6 | end | 5 | end |
7 | 6 |
plugins/custom_forms/db/migrate/20131107050913_add_position_to_field_and_alternatives.rb
1 | class AddPositionToFieldAndAlternatives < ActiveRecord::Migration | 1 | class AddPositionToFieldAndAlternatives < ActiveRecord::Migration |
2 | def self.up | 2 | def self.up |
3 | - change_table :custom_forms_plugin_fields do |t| | ||
4 | - t.integer :position, :default => 0 | ||
5 | - end | ||
6 | - | ||
7 | change_table :custom_forms_plugin_alternatives do |t| | 3 | change_table :custom_forms_plugin_alternatives do |t| |
8 | t.integer :position, :default => 0 | 4 | t.integer :position, :default => 0 |
9 | end | 5 | end |
@@ -20,10 +16,6 @@ class AddPositionToFieldAndAlternatives < ActiveRecord::Migration | @@ -20,10 +16,6 @@ class AddPositionToFieldAndAlternatives < ActiveRecord::Migration | ||
20 | end | 16 | end |
21 | 17 | ||
22 | def self.down | 18 | def self.down |
23 | - change_table :custom_forms_plugin_fields do |t| | ||
24 | - t.remove :position | ||
25 | - end | ||
26 | - | ||
27 | change_table :custom_forms_plugin_alternatives do |t| | 19 | change_table :custom_forms_plugin_alternatives do |t| |
28 | t.remove :position | 20 | t.remove :position |
29 | end | 21 | end |