summaryrefslogtreecommitdiffstats
path: root/db/migrate/010_create_comments.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2006-12-10 18:35:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2006-12-10 18:35:48 +0000
commit55ed70529aefdb3029f5ab72169b2f7909b2f2a3 (patch)
tree1f1dbf48685483905949c121cafe36e26c7efc7c /db/migrate/010_create_comments.rb
parent28c6aa4e6dfe7b4261cd4b4feb50eda62ace0572 (diff)
downloadredmine-55ed70529aefdb3029f5ab72169b2f7909b2f2a3.tar.gz
redmine-55ed70529aefdb3029f5ab72169b2f7909b2f2a3.zip
added model Comment.
comments can now be added on news. git-svn-id: http://redmine.rubyforge.org/svn/trunk@81 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/010_create_comments.rb')
-rw-r--r--db/migrate/010_create_comments.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/010_create_comments.rb b/db/migrate/010_create_comments.rb
new file mode 100644
index 000000000..322a019bc
--- /dev/null
+++ b/db/migrate/010_create_comments.rb
@@ -0,0 +1,16 @@
+class CreateComments < ActiveRecord::Migration
+ def self.up
+ create_table :comments do |t|
+ t.column :commented_type, :string, :limit => 30, :default => "", :null => false
+ t.column :commented_id, :integer, :default => 0, :null => false
+ t.column :author_id, :integer, :default => 0, :null => false
+ t.column :comment, :text, :default => "", :null => false
+ t.column :created_on, :datetime, :null => false
+ t.column :updated_on, :datetime, :null => false
+ end
+ end
+
+ def self.down
+ drop_table :comments
+ end
+end