Sha256: c0ec38d1d36da38100365bde8f4ed31b07775d64c1fe833adb348936948e5279

Contents?: true

Size: 1.16 KB

Versions: 12

Compression:

Stored size: 1.16 KB

Contents

class UpdateSchemata < ActiveRecord::Migration
  def self.up
    add_column :pages, :draft_promotion_scheduled_at, :datetime
    add_column :pages, :draft_promoted_at, :datetime
    add_column :page_parts, :draft_content, :text
    add_column :snippets, :draft_promotion_scheduled_at, :datetime
    add_column :snippets, :draft_promoted_at, :datetime
    add_column :snippets, :draft_content, :text
    add_column :layouts, :draft_promotion_scheduled_at, :datetime
    add_column :layouts, :draft_promoted_at, :datetime
    add_column :layouts, :draft_content, :text
    Page.reset_column_information
    PagePart.reset_column_information
    Snippet.reset_column_information
    Layout.reset_column_information
  end

  def self.down
    remove_column :page_parts, :draft_content 
    remove_column :pages, :draft_promotion_scheduled_at
    remove_column :pages,:draft_promoted_at
    remove_column :snippets, :draft_content
    remove_column :snippets, :draft_promotion_scheduled_at
    remove_column :snippets, :draft_promoted_at
    remove_column :layouts, :draft_content
    remove_column :layouts, :draft_promotion_scheduled_at
    remove_column :layouts, :draft_promoted_at
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
radiant-concurrent_draft-extension-1.0.11 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.10 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.9 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.8 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.7 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.6 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.5 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.4 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.3 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.2 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.1 db/migrate/001_update_schemata.rb
radiant-concurrent_draft-extension-1.0.0 db/migrate/001_update_schemata.rb