Class: BlogTables

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/blog_basic/install/templates/migrations/1_blog_tables.rb

Instance Method Summary collapse

Instance Method Details

#downObject



85
86
# File 'lib/generators/blog_basic/install/templates/migrations/1_blog_tables.rb', line 85

def down
end

#upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/generators/blog_basic/install/templates/migrations/1_blog_tables.rb', line 3

def up
  create_table "blog_basic_blog_comments", :force => true do |t|
    t.integer  "blog_post_id"
    t.integer  "user_id"
    t.string   "user_ip"
    t.string   "user_agent"
    t.string   "referrer"
    t.string   "name"
    t.string   "site_url"
    t.string   "email"
    t.text     "body"
    t.datetime "created_at"
  end

  add_index "blog_basic_blog_comments", ["blog_post_id"], :name => "index_blog_comments_on_blog_post_id"

  create_table "blog_basic_blog_contents", :force => true do |t|
    t.string   "title"
    t.text     "content"
    t.integer  "blog_post_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "blog_basic_blog_images", :force => true do |t|
    t.string   "image_file_name"
    t.string   "image_content_type"
    t.integer  "image_file_size"
    t.datetime "image_updated_at"
    t.integer  "blog_post_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "blog_basic_blog_images", ["blog_post_id"], :name => "index_blog_images_on_blog_post_id"

  create_table "blog_basic_blog_posts", :force => true do |t|
    t.string   "title",                       :null => false
    t.text     "body"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "user_id"
    t.datetime "published_at"
    t.integer  "published",    :default => 0, :null => false
    t.integer  "parent_id"
  end

  create_table "blog_basic_sessions", :force => true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "taggings", :force => true do |t|
    t.integer  "tag_id"
    t.integer  "taggable_id"
    t.string   "taggable_type"
    t.integer  "tagger_id"
    t.string   "tagger_type"
    t.string   "context"
    t.datetime "created_at"
  end

  add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
  add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"

  create_table "tags", :force => true do |t|
    t.string "name"
  end

  create_table "blog_basic_users", :force => true do |t|
    t.string   "email"
    t.string   "first_name"
    t.string   "last_name"
    t.string   "identifier_url"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "blog_basic_users", ["identifier_url"], :name => "index_users_on_identifier_url", :unique => true

end