Changeset 205

Show
Ignore:
Timestamp:
09/23/2007 16:02:08 (14 months ago)
Author:
zimbatm
Message:

Implicit id column declaration, so that AR can handle them differently,
depending on the RDBMS.

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/blog.rb

    r187 r205  
    1919      def self.up 
    2020        create_table :blog_posts do |t| 
    21           t.column :id,       :integer, :null => false 
    2221          t.column :user_id,  :integer, :null => false 
    2322          t.column :title,    :string,  :limit => 255 
     
    2524        end 
    2625        create_table :blog_users do |t| 
    27           t.column :id,       :integer, :null => false 
    2826          t.column :username, :string 
    2927          t.column :password, :string 
    3028        end 
    3129        create_table :blog_comments do |t| 
    32           t.column :id,       :integer, :null => false 
    3330          t.column :post_id,  :integer, :null => false 
    3431          t.column :username, :string 
  • trunk/examples/campsh.rb

    r187 r205  
    3636        def self.up 
    3737            create_table :campsh_commands do |t| 
    38                 t.column :id,       :integer, :null => false 
    3938                t.column :author,     :string,  :limit => 40 
    4039                t.column :name,       :string,  :limit => 255 
  • trunk/lib/camping/session.rb

    r183 r205  
    6464            ActiveRecord::Schema.define do 
    6565                create_table :sessions, :force => true, :id => false do |t| 
    66                     t.column :id,          :integer, :null => false, :primary_key => true, :auto_increment => true 
    6766                    t.column :hashid,      :string,  :limit => 32 
    6867                    t.column :created_at,  :datetime