Sha256: cfbaf1f4fb1224094dbdd296dec6f7a99882b0023d7765643bd93a6a70059046

Contents?: true

Size: 1.18 KB

Versions: 2

Compression:

Stored size: 1.18 KB

Contents

class CreateHeadTagOnPage < Landable::Migration
  def up
    execute "DROP TRIGGER #{Landable.configuration.database_schema_prefix}landable_page_revisions__no_update
              ON #{Landable.configuration.database_schema_prefix}landable.page_revisions"

    drop_table "#{Landable.configuration.database_schema_prefix}landable.head_tags"
    remove_column "#{Landable.configuration.database_schema_prefix}landable.page_revisions", :head_tags

    add_column "#{Landable.configuration.database_schema_prefix}landable.pages",          :head_content, :text
    add_column "#{Landable.configuration.database_schema_prefix}landable.page_revisions", :head_content, :text

    execute "CREATE TRIGGER #{Landable.configuration.database_schema_prefix}landable_page_revisions__no_update
            BEFORE UPDATE OF notes, is_minor, page_id, author_id, created_at, ordinal
              , theme_id, status_code_id, category_id, redirect_url, body
              , title, path, meta_tags, head_content
            ON #{Landable.configuration.database_schema_prefix}landable.page_revisions
            FOR EACH STATEMENT EXECUTE PROCEDURE #{Landable.configuration.database_schema_prefix}landable.tg_disallow();"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.14.0 db/migrate/20131008164204_create_head_tag_on_page.rb
landable-1.13.2 db/migrate/20131008164204_create_head_tag_on_page.rb