Added track files
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
|
|
||||||
|
gem 'rack', '1.3.3'
|
||||||
gem 'rails', '3.1.0'
|
gem 'rails', '3.1.0'
|
||||||
gem 'unicorn'
|
gem 'unicorn'
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -72,7 +72,7 @@ GEM
|
|||||||
nokogiri (1.5.0)
|
nokogiri (1.5.0)
|
||||||
pg (0.11.0)
|
pg (0.11.0)
|
||||||
polyglot (0.3.2)
|
polyglot (0.3.2)
|
||||||
rack (1.3.4)
|
rack (1.3.3)
|
||||||
rack-cache (1.0.3)
|
rack-cache (1.0.3)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
rack-mount (0.8.3)
|
rack-mount (0.8.3)
|
||||||
@@ -135,6 +135,7 @@ DEPENDENCIES
|
|||||||
mysql2 (= 0.3.7)
|
mysql2 (= 0.3.7)
|
||||||
nokogiri
|
nokogiri
|
||||||
pg
|
pg
|
||||||
|
rack (= 1.3.3)
|
||||||
rails (= 3.1.0)
|
rails (= 3.1.0)
|
||||||
sass
|
sass
|
||||||
therubyracer
|
therubyracer
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
class TrackFile < ActiveRecord::Base
|
||||||
|
end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class AddAvailableFlagToTracks < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :tracks, :available, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
class CreateTrackFiles < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :track_files do |t|
|
||||||
|
t.integer :track_id
|
||||||
|
t.integer :owner_id
|
||||||
|
t.integer :audio_id
|
||||||
|
t.integer :rating
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
+11
-1
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20110926031740) do
|
ActiveRecord::Schema.define(:version => 20111012064322) do
|
||||||
|
|
||||||
create_table "album_formats", :force => true do |t|
|
create_table "album_formats", :force => true do |t|
|
||||||
t.integer "album_id"
|
t.integer "album_id"
|
||||||
@@ -190,6 +190,15 @@ ActiveRecord::Schema.define(:version => 20110926031740) do
|
|||||||
add_index "track_artists", ["main"], :name => "index_track_artists_on_main"
|
add_index "track_artists", ["main"], :name => "index_track_artists_on_main"
|
||||||
add_index "track_artists", ["track_id"], :name => "index_track_artists_on_track_id"
|
add_index "track_artists", ["track_id"], :name => "index_track_artists_on_track_id"
|
||||||
|
|
||||||
|
create_table "track_files", :force => true do |t|
|
||||||
|
t.integer "track_id"
|
||||||
|
t.integer "owner_id"
|
||||||
|
t.integer "audio_id"
|
||||||
|
t.integer "rating"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "tracks", :force => true do |t|
|
create_table "tracks", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "album_id"
|
t.integer "album_id"
|
||||||
@@ -202,6 +211,7 @@ ActiveRecord::Schema.define(:version => 20110926031740) do
|
|||||||
t.integer "length"
|
t.integer "length"
|
||||||
t.string "country"
|
t.string "country"
|
||||||
t.string "mbid"
|
t.string "mbid"
|
||||||
|
t.boolean "available"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "tracks", ["album_id"], :name => "index_tracks_on_album_id"
|
add_index "tracks", ["album_id"], :name => "index_tracks_on_album_id"
|
||||||
|
|||||||
Vendored
+13
@@ -0,0 +1,13 @@
|
|||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
track_id: 1
|
||||||
|
owner_id: 1
|
||||||
|
audio_id: 1
|
||||||
|
rating: 1
|
||||||
|
|
||||||
|
two:
|
||||||
|
track_id: 1
|
||||||
|
owner_id: 1
|
||||||
|
audio_id: 1
|
||||||
|
rating: 1
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class TrackFileTest < ActiveSupport::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user