From 0861b5e37fb5af17b98ca54488864125848b3f5a Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 17 Dec 2016 17:22:36 +0100 Subject: [PATCH] Corrected migration, to populate the new tags table --- db/migrate/20161210154558_populate_tags.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/db/migrate/20161210154558_populate_tags.rb b/db/migrate/20161210154558_populate_tags.rb index bcd99a1b..1a09ba75 100644 --- a/db/migrate/20161210154558_populate_tags.rb +++ b/db/migrate/20161210154558_populate_tags.rb @@ -5,16 +5,14 @@ class PopulateTags < ActiveRecord::Migration event = Event.find_by id: result[0] event.tag_list = result[1] + ' helo world' event.save - say event.id - say event.tag_list end - change_column :events, :tags, :text, null: true - change_column :orgas, :tags, :text, null: true + change_column_null :events, :tags, true + change_column_null :orgas, :tags, true end def self.down - change_column :events, :tags, :text, null: false - change_column :orgas, :tags, :text, null: false + change_column_null :events, :tags, false + change_column_null :orgas, :tags, false end end