Sha256: 325aa7efe8a9c19de8426adde79441d7396f799e66fb02114557458335ca3c24

Contents?: true

Size: 1.34 KB

Versions: 5

Compression:

Stored size: 1.34 KB

Contents

class CreateSupportModels < ActiveRecord::Migration
  def self.up

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

    create_table :blocks do |t|
      t.string :name
      t.string :note
    end

    create_table :books do |t|
      t.string :name
      t.string :type
      t.string :note
    end

    create_table :cities do |t|
      t.string :name
      t.string :my_slug
      t.integer :population
      t.index :my_slug, :unique => true
    end

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

    create_table :districts do |t|
      t.string :name
      t.string :note
      t.string :cached_slug
      t.index :cached_slug, :unique => true
    end

    create_table :events do |t|
      t.string :name
      t.datetime :event_date
    end

    create_table :houses do |t|
      t.string :name
      t.integer :user_id
    end

    create_table :legacy_table do |t|
      t.string :name
      t.string :note
    end

    create_table :people do |t|
      t.string :name
      t.string :note
    end

    create_table :posts do |t|
      t.string :name
      t.boolean :published
      t.string :note
    end

    create_table :residents do |t|
      t.string :name
      t.integer :country_id
    end

    create_table :users do |t|
      t.string :name
      t.index :name, :unique => true
    end

  end

  def self.down
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
friendly_id-3.0.1 test/active_record_adapter/support/models.rb
friendly_id-3.0.0 test/active_record_adapter/support/models.rb
friendly_id-3.0.0.beta3 test/acktive_record/support/models.rb
friendly_id-3.0.0.beta2 test/acktive_record/support/models.rb
friendly_id-3.0.0.beta1 test/acktive_record/support/models.rb