diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-10 18:35:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-10 18:35:48 +0000 |
commit | 55ed70529aefdb3029f5ab72169b2f7909b2f2a3 (patch) | |
tree | 1f1dbf48685483905949c121cafe36e26c7efc7c /db/migrate/010_create_comments.rb | |
parent | 28c6aa4e6dfe7b4261cd4b4feb50eda62ace0572 (diff) | |
download | redmine-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.rb | 16 |
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 |