Implement track/stream

* Add Streamer class
* Use FactoryGirl for factories
* Add sha256 field to tracks
* Add mime_type field to tracks
This commit is contained in:
Thibault Jouan
2011-07-23 16:30:51 +00:00
parent 47fa969617
commit 2f6a447416
18 changed files with 166 additions and 51 deletions

View File

@@ -0,0 +1,9 @@
class AddMimeTypeFieldToTracks < ActiveRecord::Migration
def self.up
add_column :tracks, :mime_type, :string
end
def self.down
remove_column :tracks, :mime_type
end
end

View File

@@ -0,0 +1,9 @@
class AddSha256FieldToTracks < ActiveRecord::Migration
def self.up
add_column :tracks, :sha256, :string
end
def self.down
remove_column :tracks, :sha256
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110713182005) do
ActiveRecord::Schema.define(:version => 20110726101228) do
create_table "playlists", :force => true do |t|
t.string "name"
@@ -22,6 +22,8 @@ ActiveRecord::Schema.define(:version => 20110713182005) do
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
t.string "mime_type"
t.string "sha256"
end
end