Sha256: f0711f9d91d7a73ce4271988fec87286fc90c73e208898dfe70769a1f17775d4

Contents?: true

Size: 456 Bytes

Versions: 6

Compression:

Stored size: 456 Bytes

Contents

# Migration for the Roomer.tenants_table
class RoomerCreateTenants < ActiveRecord::Migration
  def self.up
    create_table(:tenants) do |t|
      t.string :url_identifier
      t.string :schema_name

      # Add additional columns here
      # t.string :name
      t.timestamps
    end

    add_index :tenants, :url_identifier, :unique => true
    add_index :tenants, :schema_name, :unique => true
  end

  def self.down
    drop_table :tenants
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
roomer-1.0.1 test/rails_app/db/migrate/global/20110825231409_roomer_create_tenants.rb
roomer-1.0.0 test/rails_app/db/migrate/global/20110825231409_roomer_create_tenants.rb
roomer-0.0.11 test/rails_app/db/migrate/global/20110825231409_roomer_create_tenants.rb
roomer-0.0.10 test/rails_app/db/migrate/global/20110825231409_roomer_create_tenants.rb
roomer-0.0.9 test/rails_app/db/migrate/global/20110825231409_roomer_create_tenants.rb
roomer-0.0.8 test/rails_app/db/migrate/global/20110825231409_roomer_create_tenants.rb