Sessions, lastfm auth workarounds

This commit is contained in:
magnolia-fan
2011-06-22 11:23:07 +04:00
parent 47b21961a0
commit 4326a4960b
17 changed files with 193 additions and 9 deletions
@@ -0,0 +1,9 @@
class AddLastfmTokenToUser < ActiveRecord::Migration
def self.up
add_column :users, :lastfm_token, :string
end
def self.down
remove_column :users, :lastfm_token
end
end
@@ -0,0 +1,14 @@
class CreateSessions < ActiveRecord::Migration
def self.up
create_table :sessions do |t|
t.integer :user_id
t.string :key
t.timestamps
end
end
def self.down
drop_table :sessions
end
end
+9 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110622000253) do
ActiveRecord::Schema.define(:version => 20110622053238) do
create_table "albums", :force => true do |t|
t.string "name"
@@ -72,6 +72,13 @@ ActiveRecord::Schema.define(:version => 20110622000253) do
t.datetime "updated_at"
end
create_table "sessions", :force => true do |t|
t.integer "user_id"
t.string "key"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "tracks", :force => true do |t|
t.string "name"
t.integer "album_id"
@@ -91,6 +98,7 @@ ActiveRecord::Schema.define(:version => 20110622000253) do
t.integer "vkid"
t.datetime "created_at"
t.datetime "updated_at"
t.string "lastfm_token"
end
end