Associate a user to his playlists
This commit is contained in:
9
db/migrate/20110830110346_add_user_id_to_playlists.rb
Normal file
9
db/migrate/20110830110346_add_user_id_to_playlists.rb
Normal 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
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user