Skip to content

Commit

Permalink
Add User and PageView models.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeJGilbert42 committed Nov 27, 2012
1 parent 0c21fc5 commit eb17c5a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/page_view.rb
@@ -0,0 +1,2 @@
class PageView < ActiveRecord::Base
end
2 changes: 2 additions & 0 deletions app/models/user.rb
@@ -0,0 +1,2 @@
class User < ActiveRecord::Base
end
9 changes: 9 additions & 0 deletions db/migrate/20121127194440_create_users.rb
@@ -0,0 +1,9 @@
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :color

t.timestamps
end
end
end
10 changes: 10 additions & 0 deletions db/migrate/20121127195432_create_page_views.rb
@@ -0,0 +1,10 @@
class CreatePageViews < ActiveRecord::Migration
def change
create_table :page_views do |t|
t.integer :user_id
t.integer :wiki_record_id

t.timestamps
end
end
end
15 changes: 14 additions & 1 deletion db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20121010084722) do
ActiveRecord::Schema.define(:version => 20121127195432) do

create_table "links", :force => true do |t|
t.integer "wiki_record_id"
Expand All @@ -23,6 +23,13 @@
add_index "links", ["target_id"], :name => "index_links_on_target_id"
add_index "links", ["wiki_record_id"], :name => "index_links_on_wiki_record_id"

create_table "page_views", :force => true do |t|
t.integer "user_id"
t.integer "wiki_record_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

create_table "people", :force => true do |t|
t.boolean "alive"
t.datetime "updated_at"
Expand All @@ -34,6 +41,12 @@

add_index "people", ["article_title"], :name => "index_people_on_article_title", :unique => true

create_table "users", :force => true do |t|
t.string "color"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

create_table "wiki_records", :force => true do |t|
t.string "article_title"
t.string "article_body"
Expand Down

0 comments on commit eb17c5a

Please sign in to comment.