Skip to content

Commit

Permalink
:id => false in events and users table for rails4
Browse files Browse the repository at this point in the history
  • Loading branch information
lisongx committed Mar 17, 2013
1 parent 98e5d03 commit d5aa08f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20130105120616_create_events.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateEvents < ActiveRecord::Migration
def change
create_table :events do |t|
create_table :events, :id => false do |t|
t.primary_key :id
t.string :adapt_url
t.string :title
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130106131926_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
create_table :users, :id => false do |t|
t.primary_key :id
t.string :avatar
t.string :signature
Expand Down
8 changes: 4 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
t.integer "wisher_count"
t.datetime "begin_time"
t.datetime "end_time"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "owner_id"
end

Expand All @@ -45,8 +45,8 @@
t.string "signature"
t.string "uid"
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "wish_users", id: false, force: true do |t|
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/update_events_info.rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace :douban do
users = User.all.map(&:id)
event.wishers = User.where(:id=>wishers&users)
event.participanters = User.where(:id=>participanters&users)
sleep 10
sleep 15
end
end

Expand Down

0 comments on commit d5aa08f

Please sign in to comment.