class CreateDocumentsAndParagraphs

Public Class Methods

down() click to toggle source
# File lib/rticles/generators/templates/create_documents_and_paragraphs.rb, line 20
def self.down
  drop_table :paragraphs
  drop_table :documents
end
up() click to toggle source
# File lib/rticles/generators/templates/create_documents_and_paragraphs.rb, line 2
def self.up
  create_table :documents do |t|
    t.string 'title'
    t.timestamps
  end
  create_table :paragraphs do |t|
    t.text 'body'
    t.integer 'position'
    t.integer 'parent_id'
    t.integer 'document_id'
    t.integer 'heading'
    t.boolean 'continuation'
    t.string 'name'
    t.string 'topic'
    t.timestamps
  end
end