Corrected migration, to populate the new tags table
This commit is contained in:
parent
5b3228dae8
commit
0861b5e37f
@ -5,16 +5,14 @@ class PopulateTags < ActiveRecord::Migration
|
|||||||
event = Event.find_by id: result[0]
|
event = Event.find_by id: result[0]
|
||||||
event.tag_list = result[1] + ' helo world'
|
event.tag_list = result[1] + ' helo world'
|
||||||
event.save
|
event.save
|
||||||
say event.id
|
|
||||||
say event.tag_list
|
|
||||||
end
|
end
|
||||||
|
|
||||||
change_column :events, :tags, :text, null: true
|
change_column_null :events, :tags, true
|
||||||
change_column :orgas, :tags, :text, null: true
|
change_column_null :orgas, :tags, true
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
change_column :events, :tags, :text, null: false
|
change_column_null :events, :tags, false
|
||||||
change_column :orgas, :tags, :text, null: false
|
change_column_null :orgas, :tags, false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user