Class: CreateRailsPageCommentPageComments
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateRailsPageCommentPageComments
- Defined in:
- lib/generators/rails_page_comment/templates/active_record/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/rails_page_comment/templates/active_record/migration.rb', line 13 def self.down drop_table :rails_page_comment_page_comments end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/rails_page_comment/templates/active_record/migration.rb', line 2 def self.up create_table :rails_page_comment_page_comments do |t| t.string :page_uri, :null => false t.text :content t. end add_index "rails_page_comment_page_comments", ["page_uri"], :name => "idx_rails_page_comment_page_comments_page_uri" end |