Sha256: 21ecb2d4f2100e4ea81e4239b4255b46962c912e8d53ec9d4bc8a20f23079a93

Contents?: true

Size: 666 Bytes

Versions: 5

Compression:

Stored size: 666 Bytes

Contents

class AddTestTables < ActiveRecord::Migration
  def up
    create_table :categories do |t|
      t.string :name
      t.timestamps
    end

    create_table :subcategories do |t|
      t.integer :category_id
      t.string :name
      t.text :description
      t.boolean :active
      t.integer :access_level
    end

    create_table :available_languages do |t|
      t.string :name
    end

    create_table :available_languages_subcategories, :id => false do |t|
      t.integer :subcategory_id
      t.integer :available_language_id
    end
  end

  def down
    drop_table :categories
    drop_table :subcategories
    drop_table :available_languages
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dynamic_fields-0.3.3 test/dummy/db/migrate/20120329183323_add_test_tables.rb
dynamic_fields-0.3.2 test/dummy/db/migrate/20120329183323_add_test_tables.rb
dynamic_fields-0.3.1 test/dummy/db/migrate/20120329183323_add_test_tables.rb
dynamic_fields-0.3.0 test/dummy/db/migrate/20120329183323_add_test_tables.rb
dynamic_fields-0.2.0 test/dummy/db/migrate/20120329183323_add_test_tables.rb