Sha256: a49a27fa5f86b3d531abef3ac5c3f59862f379df61e373721ccee88d22991249

Contents?: true

Size: 444 Bytes

Versions: 63

Compression:

Stored size: 444 Bytes

Contents

ActiveRecord::Schema.define do
  connection.tables.each do |table| drop_table table end

  create_table :users, :force => true do |t|
    t.string :login
    t.datetime :deleted_at
  end

  create_table :posts, :force => true do |t|
    t.text :body
    t.integer :user_id
    t.integer :author_id
  end

  create_table :comments, :force => true do |t|
    t.text :body
    t.integer :post_id
    t.foreign_key :post_id, :posts, :id
  end

end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
schema_plus-0.1.0.pre3 spec/schema/core_schema.rb
schema_plus-0.1.0.pre2 spec/schema/core_schema.rb
schema_plus-0.1.0.pre1 spec/schema/core_schema.rb