Sha256: 8724c507bfb1697bf46e155344bac24c9ad7aefa03cc4733c63ec9c01f7b60e2

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 Bytes

Contents

# This migration comes from pageflow (originally 20140625184800)
class DropThemes < ActiveRecord::Migration
  def up
    rename_column :pageflow_accounts_themes, :theme_id, :theme_name
    add_column :pageflow_themings, :theme_name, :string

    execute(<<-SQL)
      UPDATE pageflow_themings SET theme_name =
        (SELECT css_dir FROM pageflow_themes WHERE pageflow_themes.id = pageflow_themings.theme_id);
    SQL

    remove_reference :pageflow_themings, :theme
    drop_table :pageflow_themes
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pageflow-sitemap-0.1.0 spec/d/r/db/migrate/20150209101548_drop_themes.pageflow.rb