Sha256: 4f1f2aecce57ba0597cec53713463bce2508044811c604c9189f5b6cfafaf154
Contents?: true
Size: 601 Bytes
Versions: 12
Compression:
Stored size: 601 Bytes
Contents
# This migration comes from blogelator (originally 20140224024607) class ChangePostsPropertiesToHaveDefaults < ActiveRecord::Migration def change Blogelator::Post.all.each do |post| post.title = post.title.to_s post.body_html = post.body_html.to_s post.body_markdown = post.body_markdown.to_s post.save end change_column :blogelator_posts, :title, :string, default: "", null: false change_column :blogelator_posts, :body_html, :text, default: "", null: false change_column :blogelator_posts, :body_markdown, :text, default: "", null: false end end
Version data entries
12 entries across 12 versions & 1 rubygems