Associate a user to his playlists

This commit is contained in:
Thibault Jouan
2011-08-30 10:50:05 +00:00
parent 4f66db2682
commit 7fad9e0402
9 changed files with 48 additions and 7 deletions

View File

@@ -0,0 +1,9 @@
class AddUserIdToPlaylists < ActiveRecord::Migration
def self.up
add_column :playlists, :user_id, :integer
end
def self.down
remove_column :playlists, :user_id
end
end

View File

@@ -10,12 +10,13 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110809130610) do
ActiveRecord::Schema.define(:version => 20110830110346) do
create_table "playlists", :force => true do |t|
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
end
create_table "sessions", :force => true do |t|
@@ -40,6 +41,7 @@ ActiveRecord::Schema.define(:version => 20110809130610) do
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
t.string "bcrypt_password"
t.string "password_hash"
end