Sha256: e731e9f37ccadb88d1366348acb98196de38c2e0dd94da62d3b3e56c3c9ccb1f

Contents?: true

Size: 1.16 KB

Versions: 22

Compression:

Stored size: 1.16 KB

Contents

class AddSectioning < ActiveRecord::Migration
  def up
    create_table :abstractor_sections do |t|
      t.integer :abstractor_section_type_id
      t.string :source_type
      t.string :source_method
      t.string :name
      t.string :description
      t.string :delimiter
      t.string :custom_regular_expression
      t.boolean :return_note_on_empty_section
      t.datetime :deleted_at
      t.timestamps
    end

    create_table :abstractor_section_types do |t|
      t.string :name
      t.string :regular_expression
      t.datetime :deleted_at
      t.timestamps
    end

    create_table :abstractor_section_name_variants do |t|
      t.integer :abstractor_section_id
      t.string :name
      t.datetime :deleted_at
      t.timestamps
    end

    add_column :abstractor_abstraction_sources, :section_name, :string
    add_column :abstractor_suggestion_sources, :section_name, :string
  end

  def down
    drop_table :abstractor_sections
    drop_table :abstractor_section_types
    drop_table :abstractor_section_name_variants
    remove_column :abstractor_abstraction_sources, :section_name
    remove_column :abstractor_suggestion_sources, :section_name
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
abstractor-4.4.7 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.6 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.5 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.4 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.3 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.2 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.1 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.4.0 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.3.3 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.3.2 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.3.1 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.3.0 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.2.3 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.2.2 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.2.1 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.2.0 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.1.5 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.1.4 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.1.3 db/migrate/20141107171413_add_sectioning.rb
abstractor-4.1.2 db/migrate/20141107171413_add_sectioning.rb