# Message board help

**URL:** <https://www.ruby-forum.com/t/message-board-help/133261>\
**Category:** Rails\
**Created:** [March 29, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/message-board-help/133261 "2008-03-29T14:44:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![megax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@megax](https://www.ruby-forum.com/u/megax)\
**Post date:** [March 29, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/message-board-help/133261/1 "2008-03-29T14:44:50Z")

</div>

Im trying to do the message board tutorial here but I have rain into a  
problem

I get this error message

SQLite3::SQLException: table posts already exists: CREATE TABLE posts  
(“id” INTE  
GER PRIMARY KEY AUTOINCREMENT NOT NULL, “body” text DEFAULT NULL,  
“created\_at” d  
atetime NOT NULL, “name” varchar(100) DEFAULT NULL, “discussion\_id”  
integer NOT  
NULL)

when I try to migrate this bit of code

class CreatePostsTable \< ActiveRecord::Migration  
def self.up  
create\_table :posts do |table|  
table.column :body, :text  
table.column :created\_at, :datetime, :null =\> false  
table.column :name, :string, :limit=\>100  
table.column :discussion\_id, :integer, :null =\> false  
end  
execute “ALTER TABLE posts ADD CONSTRAINT fk\_posts  
FOREIGN KEY(discussion\_id) REFERENCES discussions(id)”  
end  
def self.down  
drop\_table :posts  
end  
end

can anyone help me?
