Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

deleted migrations. I've learned my lesson

  • Loading branch information...
commit 1fab52491c6c1d26a2418a471f535418c2a29ab5 1 parent 0c242cb
@jessieay authored
View
BIN  .DS_Store
Binary file not shown
View
BIN  db/.DS_Store
Binary file not shown
View
5 db/migrate/20120726060339_change_vote_table_columns.rb
@@ -1,5 +0,0 @@
-class ChangeVoteTableColumns < ActiveRecord::Migration
- def change
- rename_column :votes, :post_id, :votable_id
- end
-end
View
22 db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120724212313) do
+ActiveRecord::Schema.define(:version => 20120727221544) do
create_table "comments", :force => true do |t|
t.text "body"
@@ -32,6 +32,16 @@
t.integer "user_id"
end
+ create_table "sessions", :force => true do |t|
+ t.string "session_id", :null => false
+ t.text "data"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
+
create_table "users", :force => true do |t|
t.string "name"
t.string "email"
@@ -45,13 +55,15 @@
add_index "users", ["remember_token"], :name => "index_users_on_remember_token"
create_table "votes", :force => true do |t|
- t.integer "post_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.integer "votable_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "user_id"
+ t.string "votable_type"
+ t.integer "vote_value"
end
- add_index "votes", ["post_id"], :name => "index_votes_on_post_id"
add_index "votes", ["user_id"], :name => "index_votes_on_user_id"
+ add_index "votes", ["votable_id"], :name => "index_votes_on_post_id"
end
View
3  db/seeds.rb
@@ -5,3 +5,6 @@
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
+
+User.create(:email => 'jessie.a.young@gmail.com', :name: 'Jessie', :password=> '123456')
+Post.create(:title => 'First post is the best post', :url => 'http://firstpost.com')
Please sign in to comment.
Something went wrong with that request. Please try again.