Class: CreatePosts

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/bumble/templates/migrations/create_posts.rb

Class Method Summary collapse

Class Method Details

.downObject



22
23
24
# File 'lib/generators/bumble/templates/migrations/create_posts.rb', line 22

def self.down
  drop_table :posts
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/generators/bumble/templates/migrations/create_posts.rb', line 2

def self.up
  create_table :posts do |t|
    t.string   :title
    t.string   :link_url
    t.string   :image_url
    t.text     :video_embed
    t.text     :description
    t.text     :quote
    t.string   :permalink
    t.integer  :user_id
    t.string   :type
    t.boolean  :publicly_viewable, :default => true
    t.datetime :published_at
    t.datetime :deleted_at
    t.string   :via
    
    t.timestamps
  end
end