Class: CreateWikiPageAttachments

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/irwi_wiki_attachments/templates/migrate/create_wiki_page_attachments.rb

Class Method Summary collapse

Class Method Details

.downObject



15
16
17
# File 'lib/generators/irwi_wiki_attachments/templates/migrate/create_wiki_page_attachments.rb', line 15

def self.down
  drop_table :wiki_page_attachments
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/irwi_wiki_attachments/templates/migrate/create_wiki_page_attachments.rb', line 3

def self.up
  create_table :wiki_page_attachments do |t|
    t.integer :page_id, :null => false # Reference to page
    t.string   :wiki_page_attachment_file_name
    t.string   :wiki_page_attachment_content_type
    t.integer  :wiki_page_attachment_file_size

    t.timestamps
  end

end