Artist import, page

This commit is contained in:
Gregory Eremin
2012-08-27 03:53:30 +04:00
parent 235c0b809e
commit b5f616a9d9
36 changed files with 1268 additions and 312 deletions
@@ -0,0 +1,10 @@
class CreateGenres < ActiveRecord::Migration
def change
create_table :genres do |t|
t.string :rovi_id
t.string :name
t.timestamps
end
end
end
@@ -0,0 +1,10 @@
class CreateArtistGenres < ActiveRecord::Migration
def change
create_table :artist_genres do |t|
t.integer :artist_id
t.integer :genre_id
t.timestamps
end
end
end
@@ -0,0 +1,13 @@
class CreateArtists < ActiveRecord::Migration
def change
create_table :artists do |t|
t.string :rovi_id
t.string :name
t.boolean :is_group
t.text :bio
t.string :pic
t.timestamps
end
end
end
@@ -0,0 +1,13 @@
class CreateAlbums < ActiveRecord::Migration
def change
create_table :albums do |t|
t.integer :artist_id
t.string :rovi_id
t.string :title
t.integer :year
t.string :pic
t.timestamps
end
end
end
@@ -0,0 +1,14 @@
class CreateTracks < ActiveRecord::Migration
def change
create_table :tracks do |t|
t.integer :album_id
t.string :rovi_id
t.integer :disc_id
t.integer :position
t.string :title
t.integer :duration
t.timestamps
end
end
end
@@ -0,0 +1,10 @@
class CreatePerformers < ActiveRecord::Migration
def change
create_table :performers do |t|
t.integer :track_id
t.integer :artist_id
t.timestamps
end
end
end
+68
View File
@@ -0,0 +1,68 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120826172120) do
create_table "albums", :force => true do |t|
t.integer "artist_id"
t.string "rovi_id"
t.string "title"
t.integer "year"
t.string "pic"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "artist_genres", :force => true do |t|
t.integer "artist_id"
t.integer "genre_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "artists", :force => true do |t|
t.string "rovi_id"
t.string "name"
t.boolean "is_group"
t.text "bio"
t.string "pic"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "genres", :force => true do |t|
t.string "rovi_id"
t.string "name"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "performers", :force => true do |t|
t.integer "track_id"
t.integer "artist_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "tracks", :force => true do |t|
t.integer "album_id"
t.string "rovi_id"
t.integer "disc_id"
t.integer "position"
t.string "title"
t.integer "duration"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
end