Skip to content

Commit

Permalink
Added migration (table definition) for messages table
Browse files Browse the repository at this point in the history
  • Loading branch information
ludo committed Jul 25, 2011
1 parent bb436fa commit 49473e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/messages_controller.rb
@@ -1,5 +1,5 @@
class MessagesController < ApplicationController
def new

Message.new
end
end
9 changes: 9 additions & 0 deletions db/migrate/20110725193159_create_messages.rb
@@ -0,0 +1,9 @@
class CreateMessages < ActiveRecord::Migration
def change
create_table :messages do |t|
t.text :body

t.timestamps
end
end
end
8 changes: 7 additions & 1 deletion db/schema.rb
Expand Up @@ -10,6 +10,12 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 0) do
ActiveRecord::Schema.define(:version => 20110725193159) do

create_table "messages", :force => true do |t|
t.text "body"
t.datetime "created_at"
t.datetime "updated_at"
end

end

0 comments on commit 49473e9

Please sign in to comment.