diff --git a/app/Album.php b/app/Album.php index a6a5673d..67d1dd19 100644 --- a/app/Album.php +++ b/app/Album.php @@ -1,5 +1,8 @@ belongsTo('User'); + return $this->belongsTo('App\User'); } public function users() { - return $this->hasMany('ResourceUser'); + return $this->hasMany('App\ResourceUser'); } public function favourites() { - return $this->hasMany('Favourite'); + return $this->hasMany('App\Favourite'); } public function cover() { - return $this->belongsTo('Image'); + return $this->belongsTo('App\Image'); } public function tracks() { - return $this->hasMany('Track')->orderBy('track_number', 'asc'); + return $this->hasMany('App\Track')->orderBy('track_number', 'asc'); } public function comments() { - return $this->hasMany('Comment')->orderBy('created_at', 'desc'); + return $this->hasMany('App\Comment')->orderBy('created_at', 'desc'); } public static function mapPublicAlbumShow($album) diff --git a/app/Comment.php b/app/Comment.php index 2313698a..51f3b8d5 100644 --- a/app/Comment.php +++ b/app/Comment.php @@ -1,5 +1,7 @@ belongsTo('User'); + return $this->belongsTo('App\User'); } public function track() { - return $this->belongsTo('Track'); + return $this->belongsTo('App\Track'); } public function album() { - return $this->belongsTo('Album'); + return $this->belongsTo('App\Album'); } public function playlist() { - return $this->belongsTo('Playlist'); + return $this->belongsTo('App\Playlist'); } public function profile() { - return $this->belongsTo('User', 'profile_id'); + return $this->belongsTo('App\User', 'profile_id'); } public static function mapPublic($comment) diff --git a/app/Favourite.php b/app/Favourite.php index 4ece4f6d..82805431 100644 --- a/app/Favourite.php +++ b/app/Favourite.php @@ -1,5 +1,7 @@ belongsTo('User'); + return $this->belongsTo('App\User'); } public function track() { - return $this->belongsTo('Track'); + return $this->belongsTo('App\Track'); } public function album() { - return $this->belongsTo('Album'); + return $this->belongsTo('App\Album'); } public function playlist() { - return $this->belongsTo('Playlist'); + return $this->belongsTo('App\Playlist'); } /** diff --git a/app/Follower.php b/app/Follower.php index 7d03cfaf..94f55059 100644 --- a/app/Follower.php +++ b/app/Follower.php @@ -1,5 +1,7 @@ belongsTo('User'); + return $this->belongsTo('App\User'); } public function playlist() { - return $this->belongsTo('Playlist'); + return $this->belongsTo('App\Playlist'); } } \ No newline at end of file diff --git a/app/Playlist.php b/app/Playlist.php index 96bafcb3..dc8fc21e 100644 --- a/app/Playlist.php +++ b/app/Playlist.php @@ -1,5 +1,8 @@ belongsToMany('Track') + ->belongsToMany('App\Track') ->withPivot('position') ->withTimestamps() ->orderBy('position', 'asc'); @@ -132,22 +135,22 @@ class Playlist extends Model public function users() { - return $this->hasMany('ResourceUser'); + return $this->hasMany('App\ResourceUser'); } public function comments() { - return $this->hasMany('Comment')->orderBy('created_at', 'desc'); + return $this->hasMany('App\Comment')->orderBy('created_at', 'desc'); } public function pins() { - return $this->hasMany('PinnedPlaylist'); + return $this->hasMany('App\PinnedPlaylist'); } public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\User'); } public function hasPinFor($userId) diff --git a/app/ProfileRequest.php b/app/ProfileRequest.php index b885c506..bf134ce1 100644 --- a/app/ProfileRequest.php +++ b/app/ProfileRequest.php @@ -1,5 +1,7 @@ belongsTo('Genre'); + return $this->belongsTo('App\Genre'); } public function trackType() { - return $this->belongsTo('TrackType', 'track_type_id'); + return $this->belongsTo('App\TrackType', 'track_type_id'); } public function comments() { - return $this->hasMany('Comment')->orderBy('created_at', 'desc'); + return $this->hasMany('App\Comment')->orderBy('created_at', 'desc'); } public function favourites() { - return $this->hasMany('Favourite'); + return $this->hasMany('App\Favourite'); } public function cover() { - return $this->belongsTo('Image'); + return $this->belongsTo('App\Image'); } public function showSongs() { - return $this->belongsToMany('ShowSong'); + return $this->belongsToMany('App\ShowSong'); } public function users() { - return $this->hasMany('ResourceUser'); + return $this->hasMany('App\ResourceUser'); } public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\User'); } public function album() { - return $this->belongsTo('Album'); + return $this->belongsTo('App\Album'); } public function trackFiles() { - return $this->hasMany('TrackFile'); + return $this->hasMany('App\TrackFile'); } public function getYear() diff --git a/app/TrackFile.php b/app/TrackFile.php index da06e9a0..f65b38ff 100644 --- a/app/TrackFile.php +++ b/app/TrackFile.php @@ -1,5 +1,8 @@ belongsTo('Track'); + return $this->belongsTo('App\Track'); } /** diff --git a/app/TrackType.php b/app/TrackType.php index 55a606b8..24b4ef58 100644 --- a/app/TrackType.php +++ b/app/TrackType.php @@ -1,5 +1,7 @@ belongsTo('Image'); + return $this->belongsTo('App\Image'); } public function users() { - return $this->hasMany('ResourceUser', 'artist_id'); + return $this->hasMany('App\ResourceUser', 'artist_id'); } public function comments() { - return $this->hasMany('Comment', 'profile_id')->orderBy('created_at', 'desc'); + return $this->hasMany('App\Comment', 'profile_id')->orderBy('created_at', 'desc'); } public function getIsArchivedAttribute() diff --git a/database/migrations/2013_06_07_003952_create_users_table.php b/database/migrations/2013_06_07_003952_create_users_table.php index b0dd0bae..cf866ee4 100644 --- a/database/migrations/2013_06_07_003952_create_users_table.php +++ b/database/migrations/2013_06_07_003952_create_users_table.php @@ -1,57 +1,60 @@ increments('id'); - $table->string('display_name', 255); - $table->string('mlpforums_name')->nullable(); - $table->boolean('sync_names')->default(true); - $table->string('email', 150)->indexed(); - $table->string('gravatar')->nullable(); - $table->string('slug'); - $table->boolean('uses_gravatar')->default(true); - $table->boolean('can_see_explicit_content'); - $table->text('bio'); - $table->integer('track_count')->unsigned(); - $table->integer('comment_count')->unsigned(); - $table->timestamps(); - }); +class CreateUsersTable extends Migration +{ + public function up() + { + Schema::create('users', function (Blueprint $table) { + $table->increments('id'); + $table->string('display_name', 255); + $table->string('mlpforums_name')->nullable(); + $table->boolean('sync_names')->default(true); + $table->string('email', 150)->indexed(); + $table->string('gravatar')->nullable(); + $table->string('slug'); + $table->boolean('uses_gravatar')->default(true); + $table->boolean('can_see_explicit_content'); + $table->text('bio'); + $table->integer('track_count')->unsigned(); + $table->integer('comment_count')->unsigned(); + $table->timestamps(); + }); - Schema::create('roles', function($table){ - $table->increments('id'); - $table->string('name'); - }); + Schema::create('roles', function ($table) { + $table->increments('id'); + $table->string('name'); + }); - Schema::create('role_user', function($table){ - $table->increments('id'); - $table->integer('user_id')->unsigned()->index(); - $table->integer('role_id')->unsigned()->index(); - $table->timestamps(); + Schema::create('role_user', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); + $table->integer('role_id')->unsigned()->index(); + $table->timestamps(); - $table->foreign('user_id')->references('id')->on('users'); - $table->foreign('role_id')->references('id')->on('roles'); - }); + $table->foreign('user_id')->references('id')->on('users'); + $table->foreign('role_id')->references('id')->on('roles'); + }); - Schema::create('cache', function($table){ - $table->string('key')->index(); - $table->text('value'); - $table->integer('expiration')->unsigned()->index(); - }); + Schema::create('cache', function ($table) { + $table->string('key')->index(); + $table->text('value'); + $table->integer('expiration')->unsigned()->index(); + }); - DB::table('roles')->insert(['name' => 'super_admin']); - DB::table('roles')->insert(['name' => 'admin']); - DB::table('roles')->insert(['name' => 'moderator']); - DB::table('roles')->insert(['name' => 'user']); - } + DB::table('roles')->insert(['name' => 'super_admin']); + DB::table('roles')->insert(['name' => 'admin']); + DB::table('roles')->insert(['name' => 'moderator']); + DB::table('roles')->insert(['name' => 'user']); + } - public function down() { - Schema::drop('cache'); - Schema::drop('role_user'); - Schema::drop('roles'); - Schema::drop('users'); - } + public function down() + { + Schema::drop('cache'); + Schema::drop('role_user'); + Schema::drop('roles'); + Schema::drop('users'); + } } diff --git a/database/migrations/2013_06_27_015259_create_tracks_table.php b/database/migrations/2013_06_27_015259_create_tracks_table.php index ad97ac73..8f3fa5ce 100644 --- a/database/migrations/2013_06_27_015259_create_tracks_table.php +++ b/database/migrations/2013_06_27_015259_create_tracks_table.php @@ -2,127 +2,130 @@ use Illuminate\Database\Migrations\Migration; -class CreateTracksTable extends Migration { - public function up() { - Schema::create('licenses', function($table){ - $table->increments('id'); - $table->string('title', 100); - $table->text('description'); - $table->boolean('affiliate_distribution'); - $table->boolean('open_distribution'); - $table->boolean('remix'); - }); +class CreateTracksTable extends Migration +{ + public function up() + { + Schema::create('licenses', function ($table) { + $table->increments('id'); + $table->string('title', 100); + $table->text('description'); + $table->boolean('affiliate_distribution'); + $table->boolean('open_distribution'); + $table->boolean('remix'); + }); - Schema::create('genres', function($table){ - $table->increments('id'); - $table->string('name')->unique(); - $table->string('slug', 200)->index(); - }); + Schema::create('genres', function ($table) { + $table->increments('id'); + $table->string('name')->unique(); + $table->string('slug', 200)->index(); + }); - Schema::create('track_types', function($table){ - $table->increments('id'); - $table->string('title'); - $table->string('editor_title'); - }); + Schema::create('track_types', function ($table) { + $table->increments('id'); + $table->string('title'); + $table->string('editor_title'); + }); - Schema::create('tracks', function($table){ - $table->increments('id'); + Schema::create('tracks', function ($table) { + $table->increments('id'); - $table->integer('user_id')->unsigned(); - $table->integer('license_id')->unsigned()->nullable()->default(NULL); - $table->integer('genre_id')->unsigned()->nullable()->index()->default(NULL); - $table->integer('track_type_id')->unsigned()->nullable()->default(NULL); + $table->integer('user_id')->unsigned(); + $table->integer('license_id')->unsigned()->nullable()->default(null); + $table->integer('genre_id')->unsigned()->nullable()->index()->default(null); + $table->integer('track_type_id')->unsigned()->nullable()->default(null); - $table->string('title', 100)->index(); - $table->string('slug', 200)->index(); - $table->text('description')->nullable(); - $table->text('lyrics')->nullable(); - $table->boolean('is_vocal'); - $table->boolean('is_explicit'); - $table->integer('cover_id')->unsigned()->nullable(); - $table->boolean('is_downloadable'); - $table->float('duration')->unsigned(); + $table->string('title', 100)->index(); + $table->string('slug', 200)->index(); + $table->text('description')->nullable(); + $table->text('lyrics')->nullable(); + $table->boolean('is_vocal'); + $table->boolean('is_explicit'); + $table->integer('cover_id')->unsigned()->nullable(); + $table->boolean('is_downloadable'); + $table->float('duration')->unsigned(); - $table->integer('play_count')->unsigned(); - $table->integer('view_count')->unsigned(); - $table->integer('download_count')->unsigned(); - $table->integer('favourite_count')->unsigned(); - $table->integer('comment_count')->unsigned(); + $table->integer('play_count')->unsigned(); + $table->integer('view_count')->unsigned(); + $table->integer('download_count')->unsigned(); + $table->integer('favourite_count')->unsigned(); + $table->integer('comment_count')->unsigned(); - $table->timestamps(); - $table->timestamp('deleted_at')->nullable()->index(); - $table->timestamp('published_at')->nullable()->index(); - $table->timestamp('released_at')->nullable(); + $table->timestamps(); + $table->timestamp('deleted_at')->nullable()->index(); + $table->timestamp('published_at')->nullable()->index(); + $table->timestamp('released_at')->nullable(); - $table->foreign('user_id')->references('id')->on('users'); - $table->foreign('license_id')->references('id')->on('licenses'); - $table->foreign('genre_id')->references('id')->on('genres')->on_update('cascade'); - $table->foreign('track_type_id')->references('id')->on('track_types')->on_update('cascade'); - }); + $table->foreign('user_id')->references('id')->on('users'); + $table->foreign('license_id')->references('id')->on('licenses'); + $table->foreign('genre_id')->references('id')->on('genres')->on_update('cascade'); + $table->foreign('track_type_id')->references('id')->on('track_types')->on_update('cascade'); + }); - DB::table('licenses')->insert([ - 'title' => 'Personal', - 'description' => 'Only you and Pony.fm are allowed to distribute and broadcast the track.', - 'affiliate_distribution' => 0, - 'open_distribution' => 0, - 'remix' => 0 - ]); + DB::table('licenses')->insert([ + 'title' => 'Personal', + 'description' => 'Only you and Pony.fm are allowed to distribute and broadcast the track.', + 'affiliate_distribution' => 0, + 'open_distribution' => 0, + 'remix' => 0 + ]); - DB::table('licenses')->insert([ - 'title' => 'Broadcast', - 'description' => 'You, Pony.fm, and its affiliates may distribute and broadcast the track.', - 'affiliate_distribution' => 1, - 'open_distribution' => 0, - 'remix' => 0 - ]); + DB::table('licenses')->insert([ + 'title' => 'Broadcast', + 'description' => 'You, Pony.fm, and its affiliates may distribute and broadcast the track.', + 'affiliate_distribution' => 1, + 'open_distribution' => 0, + 'remix' => 0 + ]); - DB::table('licenses')->insert([ - 'title' => 'Open', - 'description' => 'Anyone is permitted to broadcast and distribute the song in its original form, with attribution to you.', - 'affiliate_distribution' => 1, - 'open_distribution' => 1, - 'remix' => 0 - ]); + DB::table('licenses')->insert([ + 'title' => 'Open', + 'description' => 'Anyone is permitted to broadcast and distribute the song in its original form, with attribution to you.', + 'affiliate_distribution' => 1, + 'open_distribution' => 1, + 'remix' => 0 + ]); - DB::table('licenses')->insert([ - 'title' => 'Remix', - 'description' => 'Anyone is permitted to broadcast and distribute the song in any form, or create derivative works based on it for any purpose, with attribution to you.', - 'affiliate_distribution' => 1, - 'open_distribution' => 1, - 'remix' => 1 - ]); + DB::table('licenses')->insert([ + 'title' => 'Remix', + 'description' => 'Anyone is permitted to broadcast and distribute the song in any form, or create derivative works based on it for any purpose, with attribution to you.', + 'affiliate_distribution' => 1, + 'open_distribution' => 1, + 'remix' => 1 + ]); - DB::table('track_types')->insert([ - 'title' => 'Original Song', - 'editor_title' => 'an original song' - ]); + DB::table('track_types')->insert([ + 'title' => 'Original Song', + 'editor_title' => 'an original song' + ]); - DB::table('track_types')->insert([ - 'title' => 'Official Song Remix', - 'editor_title' => 'a remix of an official song' - ]); + DB::table('track_types')->insert([ + 'title' => 'Official Song Remix', + 'editor_title' => 'a remix of an official song' + ]); - DB::table('track_types')->insert([ - 'title' => 'Fan Song Remix', - 'editor_title' => 'a remix of a fan song' - ]); + DB::table('track_types')->insert([ + 'title' => 'Fan Song Remix', + 'editor_title' => 'a remix of a fan song' + ]); - DB::table('track_types')->insert([ - 'title' => 'Ponified Song', - 'editor_title' => 'a non-pony song, turned pony' - ]); + DB::table('track_types')->insert([ + 'title' => 'Ponified Song', + 'editor_title' => 'a non-pony song, turned pony' + ]); - DB::table('track_types')->insert([ - 'title' => 'Official Show Audio Remix', - 'editor_title' => 'a remix of official show audio' - ]); - } + DB::table('track_types')->insert([ + 'title' => 'Official Show Audio Remix', + 'editor_title' => 'a remix of official show audio' + ]); + } - public function down() { - Schema::drop('tracks'); - Schema::drop('licenses'); - Schema::drop('track_types'); - Schema::drop('genres'); - } + public function down() + { + Schema::drop('tracks'); + Schema::drop('licenses'); + Schema::drop('track_types'); + Schema::drop('genres'); + } } \ No newline at end of file diff --git a/database/migrations/2013_07_26_230827_create_images_table.php b/database/migrations/2013_07_26_230827_create_images_table.php index bf1f9e0b..90851397 100644 --- a/database/migrations/2013_07_26_230827_create_images_table.php +++ b/database/migrations/2013_07_26_230827_create_images_table.php @@ -2,43 +2,46 @@ use Illuminate\Database\Migrations\Migration; -class CreateImagesTable extends Migration { - public function up() { - Schema::create('images', function($table) { - $table->increments('id'); - $table->string('filename', 256); - $table->string('mime', 100); - $table->string('extension', 32); - $table->integer('size'); - $table->string('hash', 32); - $table->integer('uploaded_by')->unsigned(); - $table->timestamps(); +class CreateImagesTable extends Migration +{ + public function up() + { + Schema::create('images', function ($table) { + $table->increments('id'); + $table->string('filename', 256); + $table->string('mime', 100); + $table->string('extension', 32); + $table->integer('size'); + $table->string('hash', 32); + $table->integer('uploaded_by')->unsigned(); + $table->timestamps(); - $table->foreign('uploaded_by')->references('id')->on('users'); - }); + $table->foreign('uploaded_by')->references('id')->on('users'); + }); - Schema::table('users', function($table) { - $table->integer('avatar_id')->unsigned()->nullable(); - $table->foreign('avatar_id')->references('id')->on('images'); - }); + Schema::table('users', function ($table) { + $table->integer('avatar_id')->unsigned()->nullable(); + $table->foreign('avatar_id')->references('id')->on('images'); + }); - DB::table('tracks')->update(['cover_id' => null]); + DB::table('tracks')->update(['cover_id' => null]); - Schema::table('tracks', function($table) { - $table->foreign('cover_id')->references('id')->on('images'); - }); - } + Schema::table('tracks', function ($table) { + $table->foreign('cover_id')->references('id')->on('images'); + }); + } - public function down() { - Schema::table('tracks', function($table) { - $table->dropForeign('tracks_cover_id_foreign'); - }); + public function down() + { + Schema::table('tracks', function ($table) { + $table->dropForeign('tracks_cover_id_foreign'); + }); - Schema::table('users', function($table) { - $table->dropForeign('users_avatar_id_foreign'); - $table->dropColumn('avatar_id'); - }); + Schema::table('users', function ($table) { + $table->dropForeign('users_avatar_id_foreign'); + $table->dropColumn('avatar_id'); + }); - Schema::drop('images'); - } + Schema::drop('images'); + } } \ No newline at end of file diff --git a/database/migrations/2013_07_28_034328_create_songs_table.php b/database/migrations/2013_07_28_034328_create_songs_table.php index 9b7e24f2..4ba519a0 100644 --- a/database/migrations/2013_07_28_034328_create_songs_table.php +++ b/database/migrations/2013_07_28_034328_create_songs_table.php @@ -2,28 +2,30 @@ use Illuminate\Database\Migrations\Migration; -class CreateSongsTable extends Migration { - public function up() { - Schema::create('show_songs', function($table) { - $table->increments('id'); - $table->string('title', 100); - $table->text('lyrics'); - $table->string('slug', 200)->indexed(); - }); +class CreateSongsTable extends Migration +{ + public function up() + { + Schema::create('show_songs', function ($table) { + $table->increments('id'); + $table->string('title', 100); + $table->text('lyrics'); + $table->string('slug', 200)->indexed(); + }); - Schema::create('show_song_track', function($table) { - $table->increments('id'); - $table->integer('track_id')->unsigned(); - $table->integer('show_song_id')->unsigned(); + Schema::create('show_song_track', function ($table) { + $table->increments('id'); + $table->integer('track_id')->unsigned(); + $table->integer('show_song_id')->unsigned(); - $table->foreign('track_id')->references('id')->on('tracks')->on_update('cascade'); - $table->foreign('show_song_id')->references('id')->on('show_songs')->on_update('cascade'); - }); + $table->foreign('track_id')->references('id')->on('tracks')->on_update('cascade'); + $table->foreign('show_song_id')->references('id')->on('show_songs')->on_update('cascade'); + }); - DB::table('show_songs')->insert([ - 'id' => 1, - 'title' => "Equestria Girls", - 'lyrics' => "[Pinkie Pie] + DB::table('show_songs')->insert([ + 'id' => 1, + 'title' => "Equestria Girls", + 'lyrics' => "[Pinkie Pie] Ooh! This is my jam! There is a place @@ -97,12 +99,12 @@ Aoaoah oh, aoaoaoh! Break it down, DJ Pon-3 These are the ponies I love the most I wish you could all be Equestria girls", - 'slug' => "equestria-girls", - ]); - DB::table('show_songs')->insert([ - 'id' => 2, - 'title' => "My Little Pony Theme Song", - 'lyrics' => "[Backup singer] + 'slug' => "equestria-girls", + ]); + DB::table('show_songs')->insert([ + 'id' => 2, + 'title' => "My Little Pony Theme Song", + 'lyrics' => "[Backup singer] My Little Pony, My Little Pony Ahh, ahh, ahh, ahhh….. @@ -132,12 +134,12 @@ It's an easy feat And magic makes it all complete You have my little ponies Do you know you're all my very best friends?", - 'slug' => "my-little-pony-theme-song", - ]); - DB::table('show_songs')->insert([ - 'id' => 3, - 'title' => "Laughter Song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "my-little-pony-theme-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 3, + 'title' => "Laughter Song", + 'lyrics' => "[Pinkie Pie] When I was a little filly and the sun was going down... Twilight Sparkle: Tell me she's not... @@ -176,12 +178,12 @@ Snortle at the spooky And tell that big dumb scary face to take a hike and leave you alone and if he thinks he can scare you then he's got another thing coming and the very idea of such a thing just makes you wanna... hahahaha... heh... Laaaaaaauuugh!", - 'slug' => "laughter-song", - ]); -DB::table('show_songs')->insert([ - 'id' => 4, - 'title' => "Pinkie's Gala Fantasy Song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "laughter-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 4, + 'title' => "Pinkie's Gala Fantasy Song", + 'lyrics' => "[Pinkie Pie] Oh the Grand Galloping Gala is the best place for me Oh the Grand Galloping Gala is the best place for me Hip hip @@ -197,12 +199,12 @@ Oh the Grand Galloping Gala is the best place for me 'Cause it's the most galarrific superly-terrific gala ever In the whole galaxy Wheee!", - 'slug' => "pinkies-gala-fantasy-song", -]); -DB::table('show_songs')->insert([ - 'id' => 5, - 'title' => "The Ticket Song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "pinkies-gala-fantasy-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 5, + 'title' => "The Ticket Song", + 'lyrics' => "[Pinkie Pie] Twilight is my bestest friend Whoopie, whoopie! @@ -222,22 +224,22 @@ Twilight Sparkle: Pinkie! She'll give her extra ticket to the gala to me! Twilight Sparkle: PIIINKIIIE!!", - 'slug' => "the-ticket-song", -]); -DB::table('show_songs')->insert([ - 'id' => 6, - 'title' => "Junior Speedsters Chant", - 'lyrics' => "[Rainbow Dash/Gilda] + 'slug' => "the-ticket-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 6, + 'title' => "Junior Speedsters Chant", + 'lyrics' => "[Rainbow Dash/Gilda] Junior Speedsters are our lives, Sky-bound soars and daring dives Junior Speedsters, it's our quest, To some day be the very best!", - 'slug' => "junior-speedsters-chant", -]); -DB::table('show_songs')->insert([ - 'id' => 7, - 'title' => "Hop Skip and Jump song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "junior-speedsters-chant", + ]); + DB::table('show_songs')->insert([ + 'id' => 7, + 'title' => "Hop Skip and Jump song", + 'lyrics' => "[Pinkie Pie] It's not very far Just move your little rump You can make it if you try with a hop, skip and jump @@ -252,12 +254,12 @@ A hop, skip and jump, A hop, skip and jump, A hop skip and jump, A hop skip and jump!", - 'slug' => "hop-skip-and-jump-song", -]); -DB::table('show_songs')->insert([ - 'id' => 8, - 'title' => "Evil Enchantress song", - 'lyrics' => "[Pinkie Pie/Flutterguy] + 'slug' => "hop-skip-and-jump-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 8, + 'title' => "Evil Enchantress song", + 'lyrics' => "[Pinkie Pie/Flutterguy] She's an evil enchantress She does evil dances And if you look deep in her eyes @@ -267,12 +269,12 @@ She'll mix up an evil brew Then she'll gobble you up In a big tasty stew Soooo.... Watch out!", - 'slug' => "evil-enchantress-song", -]); -DB::table('show_songs')->insert([ - 'id' => 9, - 'title' => "Winter Wrap Up", - 'lyrics' => "[Rainbow Dash] + 'slug' => "evil-enchantress-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 9, + 'title' => "Winter Wrap Up", + 'lyrics' => "[Rainbow Dash] Three months of winter coolness And awesome holidays @@ -407,12 +409,12 @@ Winter Wrap Up! Winter Wrap Up! 'Cause tomorrow spring is here 'Cause tomorrow spring is here 'Cause tomorrow spring is here!", - 'slug' => "winter-wrap-up", -]); -DB::table('show_songs')->insert([ - 'id' => 10, - 'title' => "Cupcake Song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "winter-wrap-up", + ]); + DB::table('show_songs')->insert([ + 'id' => 10, + 'title' => "Cupcake Song", + 'lyrics' => "[Pinkie Pie] All you have to do is take a cup of flour! Add it to the mix! Now just take a little something sweet, not sour! @@ -426,12 +428,12 @@ And you never get your fill of... Cupcakes! So sweet and tasty! Cupcakes! Don't be too hasty! Cupcakes! Cupcakes, cupcakes, CUPCAKES!", - 'slug' => "cupcake-song", -]); -DB::table('show_songs')->insert([ - 'id' => 11, - 'title' => "Art of the Dress", - 'lyrics' => "[Rarity] + 'slug' => "cupcake-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 11, + 'title' => "Art of the Dress", + 'lyrics' => "[Rarity] Thread by thread, stitching it together Twilight's dress, cutting out the pattern snip by snip Making sure the fabric folds nicely @@ -467,12 +469,12 @@ Croup, dock, haunch, shoulders, hip Thread by thread, primmed and pressed Yard by yard, never stressed And that's the art of the dress!", - 'slug' => "art-of-the-dress", -]); -DB::table('show_songs')->insert([ - 'id' => 12, - 'title' => "Hush Now Lullaby", - 'lyrics' => "[Fluttershy] + 'slug' => "art-of-the-dress", + ]); + DB::table('show_songs')->insert([ + 'id' => 12, + 'title' => "Hush Now Lullaby", + 'lyrics' => "[Fluttershy] Hush now, quiet now It's time to lay your sleepy head Hush now, quiet now @@ -502,12 +504,12 @@ Said hush now! Quiet now! It's time to go to BED! OW!", - 'slug' => "hush-now-lullaby", -]); -DB::table('show_songs')->insert([ - 'id' => 13, - 'title' => "Cutie Mark Crusaders Song", - 'lyrics' => "[Scootaloo] + 'slug' => "hush-now-lullaby", + ]); + DB::table('show_songs')->insert([ + 'id' => 13, + 'title' => "Cutie Mark Crusaders Song", + 'lyrics' => "[Scootaloo] Look, here, are three little ponies Ready to sing for this crowd Listen up, 'cause here's our story @@ -556,12 +558,12 @@ We are the Cutie Mark Crusaders On a quest to find out who we are And we will never stop the journey Not until we have our cutie marks!", - 'slug' => "cutie-mark-crusaders-song", -]); -DB::table('show_songs')->insert([ - 'id' => 14, - 'title' => "You Got to Share, You Got to Care", - 'lyrics' => "[Pinkie Pie] + 'slug' => "cutie-mark-crusaders-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 14, + 'title' => "You Got to Share, You Got to Care", + 'lyrics' => "[Pinkie Pie] We may be divided But of you all, I beg To remember we're all hoofed @@ -594,12 +596,12 @@ You gotta care It's the right thing to do And there'll always be a way Thro-o-o-o-ugh!", - 'slug' => "you-got-to-share-you-got-to-care", -]); -DB::table('show_songs')->insert([ - 'id' => 15, - 'title' => "So Many Wonders", - 'lyrics' => "[Fluttershy] + 'slug' => "you-got-to-share-you-got-to-care", + ]); + DB::table('show_songs')->insert([ + 'id' => 15, + 'title' => "So Many Wonders", + 'lyrics' => "[Fluttershy] What is this place filled with so many wonders? Casting its spell @@ -618,12 +620,12 @@ If I knew the ground had so much up its sleeve I'd have come here sooner, and never leave Yes, I love everythiiiiiiiiiiiing!", - 'slug' => "so-many-wonders", -]); -DB::table('show_songs')->insert([ - 'id' => 16, - 'title' => "Pinkie Pie's Singing Telegram", - 'lyrics' => "[Pinkie Pie] + 'slug' => "so-many-wonders", + ]); + DB::table('show_songs')->insert([ + 'id' => 16, + 'title' => "Pinkie Pie's Singing Telegram", + 'lyrics' => "[Pinkie Pie] This is your singing telegram I hope it finds you well You're invited to a party @@ -648,12 +650,12 @@ It won't be the same without you So we hope that you say yes So, please, oh please R.S.V.P And come, and be our guest!", - 'slug' => "pinkie-pies-singing-telegram", -]); -DB::table('show_songs')->insert([ - 'id' => 17, - 'title' => "At the Gala", - 'lyrics' => "Twilight Sparkle: I can't believe we're finally here. With all that we've imagined, the reality of this night is sure to make this... The Best Night Ever! + 'slug' => "pinkie-pies-singing-telegram", + ]); + DB::table('show_songs')->insert([ + 'id' => 17, + 'title' => "At the Gala", + 'lyrics' => "Twilight Sparkle: I can't believe we're finally here. With all that we've imagined, the reality of this night is sure to make this... The Best Night Ever! At the Gala @@ -763,12 +765,12 @@ Twilight Sparkle: To talk! Into the Gala, into the Gala! And we'll have the best night ever! At the Gala!", - 'slug' => "at-the-gala", -]); -DB::table('show_songs')->insert([ - 'id' => 18, - 'title' => "I'm at the Grand Galloping Gala", - 'lyrics' => "[Pinkie Pie] + 'slug' => "at-the-gala", + ]); + DB::table('show_songs')->insert([ + 'id' => 18, + 'title' => "I'm at the Grand Galloping Gala", + 'lyrics' => "[Pinkie Pie] I'm at the Grand Galloping Gala, I'm at the Grand Galloping Gala, I'm at the Grand Galloping Gala, @@ -780,12 +782,12 @@ I'm at the Grand Galloping GalaaaaaaaaaaAAAAAAAAAAAA! [pause] It's all I ever... dreamed?", - 'slug' => "im-at-the-grand-galloping-gala", -]); -DB::table('show_songs')->insert([ - 'id' => 19, - 'title' => "Pony Pokey", - 'lyrics' => "[Pinkie] + 'slug' => "im-at-the-grand-galloping-gala", + ]); + DB::table('show_songs')->insert([ + 'id' => 19, + 'title' => "Pony Pokey", + 'lyrics' => "[Pinkie] You reach your right hoof in You reach your right hoof out You reach your right hoof in @@ -830,12 +832,12 @@ You do the Pony Pokey And that's what it's all about Yeah!", - 'slug' => "pony-pokey", -]); -DB::table('show_songs')->insert([ - 'id' => 20, - 'title' => "Find A Pet Song", - 'lyrics' => "[Fluttershy] + 'slug' => "pony-pokey", + ]); + DB::table('show_songs')->insert([ + 'id' => 20, + 'title' => "Find A Pet Song", + 'lyrics' => "[Fluttershy] Now, Rainbow, my dear, I cannot express my delight It's abundantly clear That somewhere out here @@ -969,12 +971,12 @@ May the games Begin Rainbow Dash: And may the best pet win!", - 'slug' => "find-a-pet-song", -]); -DB::table('show_songs')->insert([ - 'id' => 21, - 'title' => "Becoming Popular (The Pony Everypony Should Know)", - 'lyrics' => "[Rarity] + 'slug' => "find-a-pet-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 21, + 'title' => "Becoming Popular (The Pony Everypony Should Know)", + 'lyrics' => "[Rarity] I'll be the toast of the town, the girl on the go I'm the type of pony everypony, everypony should know @@ -998,44 +1000,44 @@ I'm the type of pony everypony, everypony should know Because I'm the type of pony Yes, I'm the type of pony Yes, I'm the type of pony everypony should know", - 'slug' => "becoming-popular-the-pony-everypony-should-know", -]); -DB::table('show_songs')->insert([ - 'id' => 22, - 'title' => "The Heart Carol", - 'lyrics' => "[Choir] + 'slug' => "becoming-popular-the-pony-everypony-should-know", + ]); + DB::table('show_songs')->insert([ + 'id' => 22, + 'title' => "The Heart Carol", + 'lyrics' => "[Choir] The fire of friendship lives in our hearts As long as it burns we cannot drift apart Though quarrels arise, their numbers are few Laughter and singing will see us through (will see us through) We are a circle of pony friends A circle of friends we'll be to the very end", - 'slug' => "the-heart-carol", -]); -DB::table('show_songs')->insert([ - 'id' => 23, - 'title' => "Happy Monthiversary", - 'lyrics' => "[Pinkie Pie] + 'slug' => "the-heart-carol", + ]); + DB::table('show_songs')->insert([ + 'id' => 23, + 'title' => "Happy Monthiversary", + 'lyrics' => "[Pinkie Pie] Happy monthiversary to you and you today [very quickly] I can't believe you're already a month old time sure flies doesn't it well it seems like only yesterday you were born. But now you're a month old today, hey!", - 'slug' => "happy-monthiversary", -]); -DB::table('show_songs')->insert([ - 'id' => 24, - 'title' => "Piggy Dance", - 'lyrics' => "[Pinkie Pie] + 'slug' => "happy-monthiversary", + ]); + DB::table('show_songs')->insert([ + 'id' => 24, + 'title' => "Piggy Dance", + 'lyrics' => "[Pinkie Pie] First you jiggle your tail! Oink oink oink! Then you wriggle your snout! Oink oink oink! Then you wiggle your rump! Oink oink oink! Then shout it out! Oink oink oink! [repeat verse two more times]", - 'slug' => "piggy-dance", -]); -DB::table('show_songs')->insert([ - 'id' => 25, - 'title' => "The Flim Flam Brothers", - 'lyrics' => "[Flim] + 'slug' => "piggy-dance", + ]); + DB::table('show_songs')->insert([ + 'id' => 25, + 'title' => "The Flim Flam Brothers", + 'lyrics' => "[Flim] Well, lookie what we got here, brother of mine, it's the same in every town Ponies with thirsty throats, dry tongues, and not a drop of cider to be found Maybe they're not aware that there's really no need for this teary despair @@ -1195,12 +1197,12 @@ Traveling salesponies nonpareil [Flim and Flam] Yeah!", - 'slug' => "the-flim-flam-brothers", -]); -DB::table('show_songs')->insert([ - 'id' => 26, - 'title' => "The Perfect Stallion", - 'lyrics' => "[Sweetie Belle] + 'slug' => "the-flim-flam-brothers", + ]); + DB::table('show_songs')->insert([ + 'id' => 26, + 'title' => "The Perfect Stallion", + 'lyrics' => "[Sweetie Belle] Cheerilee is sweet and kind. She's the best teacher we could hope for. The perfect stallion you and I must find. @@ -1278,12 +1280,12 @@ We did it girls. We've found the one. Who will send our teacher's heart aflutter. Apple Bloom: Wait a minute. Let me get this straight. Are you talking about my brother?", - 'slug' => "the-perfect-stallion", -]); -DB::table('show_songs')->insert([ - 'id' => 27, - 'title' => "Smile Song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "the-perfect-stallion", + ]); + DB::table('show_songs')->insert([ + 'id' => 27, + 'title' => "Smile Song", + 'lyrics' => "[Pinkie Pie] My name is Pinkie Pie (Hello!) And I am here to say (How ya doin'?) I'm gonna make you smile, and I will brighten up your day-aaay! @@ -1354,21 +1356,21 @@ Smile, smile, smile, smile, smile! [Pinkie Pie] Come on and smile Come on and smile!", - 'slug' => "smile-song", -]); -DB::table('show_songs')->insert([ - 'id' => 28, - 'title' => "Cranky Doodle Donkey", - 'lyrics' => "[Pinkie Pie] + 'slug' => "smile-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 28, + 'title' => "Cranky Doodle Donkey", + 'lyrics' => "[Pinkie Pie] You're a Cranky Doodle Donkey guy. A Cranky Doodle Donkey. I never met you but you're my new friend and I'm your best friend Pinkie Pie!", - 'slug' => "cranky-doodle-donkey", -]); -DB::table('show_songs')->insert([ - 'id' => 29, - 'title' => "Welcome Song", - 'lyrics' => "[Pinkie Pie] + 'slug' => "cranky-doodle-donkey", + ]); + DB::table('show_songs')->insert([ + 'id' => 29, + 'title' => "Welcome Song", + 'lyrics' => "[Pinkie Pie] Welcome welcome welcome A fine welcome to you Welcome welcome welcome @@ -1379,12 +1381,12 @@ Welcome welcome welcome To Ponyville today Pinkie Pie: Wait for it!", - 'slug' => "welcome-song", -]); -DB::table('show_songs')->insert([ - 'id' => 30, - 'title' => "Cranky Doodle Joy", - 'lyrics' => "[Pinkie Pie] + 'slug' => "welcome-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 30, + 'title' => "Cranky Doodle Joy", + 'lyrics' => "[Pinkie Pie] He had a Cranky Doodle sweetheart She's his cranky doodle joy I helped the Cranky Doodle boy, yeah! @@ -1392,12 +1394,12 @@ I helped the Cranky Doodle boy! Cranky Doodle Donkey and Matilda: Pinkie! Pinkie Pie: Whoops, privacy. Sorry.", - 'slug' => "cranky-doodle-joy", -]); -DB::table('show_songs')->insert([ - 'id' => 31, - 'title' => "Big Brother Best Friend Forever (B.B.B.F.F.)", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "cranky-doodle-joy", + ]); + DB::table('show_songs')->insert([ + 'id' => 31, + 'title' => "Big Brother Best Friend Forever (B.B.B.F.F.)", + 'lyrics' => "[Twilight Sparkle] When I was just a filly, I found it rather silly To see how many other ponies I could meet I had my books to read, didn't know that I would ever need @@ -1424,12 +1426,12 @@ I hoped that he would stay My big brother best friend Forever... Forever...", - 'slug' => "big-brother-best-friend-forever-bbbff", -]); -DB::table('show_songs')->insert([ - 'id' => 32, - 'title' => "This Day Aria", - 'lyrics' => "[Queen Chrysalis] + 'slug' => "big-brother-best-friend-forever-bbbff", + ]); + DB::table('show_songs')->insert([ + 'id' => 32, + 'title' => "This Day Aria", + 'lyrics' => "[Queen Chrysalis] This day is going to be perfect The kind of day of which I've dreamed since I was small Everypony will gather 'round @@ -1475,12 +1477,12 @@ He'll end up marrying a fake Shining Armor will be [Queen Chrysalis]: ...mine, all mine. [evil laugh]", - 'slug' => "this-day-aria", - ]); -DB::table('show_songs')->insert([ - 'id' => 33, - 'title' => "Love Is In Bloom", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "this-day-aria", + ]); + DB::table('show_songs')->insert([ + 'id' => 33, + 'title' => "Love Is In Bloom", + 'lyrics' => "[Twilight Sparkle] Love is in bloom A beautiful bride, a handsome groom, Two hearts becoming one @@ -1502,12 +1504,12 @@ A beautiful bride, a handsome groom I said love is in bloom You're starting a life and making room For us, (For us... For us...Aah...)", - 'slug' => "love-is-in-bloom", - ]); -DB::table('show_songs')->insert([ - 'id' => 34, - 'title' => "The Failure Song", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "love-is-in-bloom", + ]); + DB::table('show_songs')->insert([ + 'id' => 34, + 'title' => "The Failure Song", + 'lyrics' => "[Twilight Sparkle] I was prepared to do my best Thought I could handle any test For I can do so many tricks @@ -1554,12 +1556,12 @@ No I wasn't [Twilight Sparkle and Spike] Prepared... for this!", - 'slug' => "the-failure-song", - ]); -DB::table('show_songs')->insert([ - 'id' => 35, - 'title' => "The Ballad of the Crystal Empire", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "the-failure-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 35, + 'title' => "The Ballad of the Crystal Empire", + 'lyrics' => "[Twilight Sparkle] Princess Cadence needs our help Her magic will not last forever I think we can do it @@ -1597,12 +1599,12 @@ Can you learn it in a day? Oh, we have to get this right Yes we have to make them see We can save the Crystal Ponies... with their history!", - 'slug' => "the-ballad-of-the-crystal-empire", - ]); -DB::table('show_songs')->insert([ - 'id' => 36, - 'title' => "The Success Song", - 'lyrics' => "[Rarity] + 'slug' => "the-ballad-of-the-crystal-empire", + ]); + DB::table('show_songs')->insert([ + 'id' => 36, + 'title' => "The Success Song", + 'lyrics' => "[Rarity] You were prepared to do your best Had what it takes to pass the test All those doubts you can dismiss @@ -1644,12 +1646,12 @@ Turns out you were [Spike, Applejack, Rainbow Dash, Rarity, Pinkie Pie, Fluttershy, and Twilight Sparkle] Prepared... for this!", - 'slug' => "the-success-song", - ]); -DB::table('show_songs')->insert([ - 'id' => 37, - 'title' => "Babs Seed", - 'lyrics' => "[Cutie Mark Crusaders] + 'slug' => "the-success-song", + ]); + DB::table('show_songs')->insert([ + 'id' => 37, + 'title' => "Babs Seed", + 'lyrics' => "[Cutie Mark Crusaders] Yeah, yeah, yeah Yeah, yeah, yeah Yeah, yeah, yeah, yeah, yeah @@ -1708,12 +1710,12 @@ Babs Seed, Babs Seed- [Scootaloo] She's just a bad, bad seed", - 'slug' => "babs-seed", - ]); -DB::table('show_songs')->insert([ - 'id' => 38, - 'title' => "Raise This Barn", - 'lyrics' => "[Applejack] + 'slug' => "babs-seed", + ]); + DB::table('show_songs')->insert([ + 'id' => 38, + 'title' => "Raise This Barn", + 'lyrics' => "[Applejack] Yee-hoo! Raise this barn, raise this barn @@ -1803,12 +1805,12 @@ All we need to strive to be Is part of the Apple family Apple Bloom: Yeah!", - 'slug' => "raise-this-barn", - ]); -DB::table('show_songs')->insert([ - 'id' => 39, - 'title' => "Morning in Ponyville", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "raise-this-barn", + ]); + DB::table('show_songs')->insert([ + 'id' => 39, + 'title' => "Morning in Ponyville", + 'lyrics' => "[Twilight Sparkle] Morning in Ponyville shimmers Morning in Ponyville shines And I know for absolute certain @@ -1828,12 +1830,12 @@ Morning in Ponyville shimmers Morning in Ponyville shines And I know for absolute certain That everything is certainly...", - 'slug' => "morning-in-ponyville", - ]); -DB::table('show_songs')->insert([ - 'id' => 40, - 'title' => "What My Cutie Mark Is Telling Me", - 'lyrics' => "[Rainbow Dash] + 'slug' => "morning-in-ponyville", + ]); + DB::table('show_songs')->insert([ + 'id' => 40, + 'title' => "What My Cutie Mark Is Telling Me", + 'lyrics' => "[Rainbow Dash] These animals don't listen, no, not one little bit They run around out of control and throw their hissy fits It's up to me to stop them, 'cause plainly you can see @@ -1880,12 +1882,12 @@ It's what my cutie mark [All] Yes, it's what my cutie mark is telling me!", - 'slug' => "what-my-cutie-mark-is-telling-me", - ]); -DB::table('show_songs')->insert([ - 'id' => 41, - 'title' => "I've Got to Find a Way", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "what-my-cutie-mark-is-telling-me", + ]); + DB::table('show_songs')->insert([ + 'id' => 41, + 'title' => "I've Got to Find a Way", + 'lyrics' => "[Twilight Sparkle] I have to find a way To make this all okay I can't believe this small mistake @@ -1899,12 +1901,12 @@ I don't know what to do I fear I won't get through to you Oh why, oh why", - 'slug' => "ive-got-to-find-a-way", - ]); -DB::table('show_songs')->insert([ - 'id' => 42, - 'title' => "A True, True Friend", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "ive-got-to-find-a-way", + ]); + DB::table('show_songs')->insert([ + 'id' => 42, + 'title' => "A True, True Friend", + 'lyrics' => "[Twilight Sparkle] A true, true friend helps a friend in need A friend will be there to help them see @@ -1982,12 +1984,12 @@ A true, true friend helps a friend in need To see the light (to see the light) That shines (that shines) From a true, true friend!", - 'slug' => "a-true-true-friend", - ]); -DB::table('show_songs')->insert([ - 'id' => 43, - 'title' => "Celestia's Ballad", - 'lyrics' => "[Princess Celestia] + 'slug' => "a-true-true-friend", + ]); + DB::table('show_songs')->insert([ + 'id' => 43, + 'title' => "Celestia's Ballad", + 'lyrics' => "[Princess Celestia] You've come such a long, long way And I've watched you from that very first day To see how you might grow @@ -2001,12 +2003,12 @@ To go where you will go To see what you will see To find what you will be For it's time for you to fulfill your destiny", - 'slug' => "celestias-ballad", - ]); -DB::table('show_songs')->insert([ - 'id' => 44, - 'title' => "Behold, Princess Twilight Sparkle", - 'lyrics' => "[Choir] + 'slug' => "celestias-ballad", + ]); + DB::table('show_songs')->insert([ + 'id' => 44, + 'title' => "Behold, Princess Twilight Sparkle", + 'lyrics' => "[Choir] Thou Princess Twilight cometh Behold, behold A Princess here before us @@ -2017,12 +2019,12 @@ The Princess Twilight cometh Behold, behold (behold, behold) The Princess is The Princess is here", - 'slug' => "behold-princess-twilight-sparkle", - ]); -DB::table('show_songs')->insert([ - 'id' => 45, - 'title' => "Life in Equestria", - 'lyrics' => "[Twilight Sparkle] + 'slug' => "behold-princess-twilight-sparkle", + ]); + DB::table('show_songs')->insert([ + 'id' => 45, + 'title' => "Life in Equestria", + 'lyrics' => "[Twilight Sparkle] Life in Equestria shimmers Life in Equestria shines And I know for absolute certain @@ -2034,17 +2036,18 @@ Yes, everything is certainly fine It’s fine Twilight Sparkle: Yes! Everything’s going to be just fine!", - 'slug' => "life-in-equestria", - ]); - } + 'slug' => "life-in-equestria", + ]); + } - public function down() { - Schema::table('show_song_track', function($table){ - $table->dropForeign('show_song_track_track_id_foreign'); - $table->dropForeign('show_song_track_show_song_id_foreign'); - }); + public function down() + { + Schema::table('show_song_track', function ($table) { + $table->dropForeign('show_song_track_track_id_foreign'); + $table->dropForeign('show_song_track_show_song_id_foreign'); + }); - Schema::drop('show_song_track'); - Schema::drop('show_songs'); - } + Schema::drop('show_song_track'); + Schema::drop('show_songs'); + } } \ No newline at end of file diff --git a/database/migrations/2013_07_28_060804_create_albums.php b/database/migrations/2013_07_28_060804_create_albums.php index d2aa6456..4cba16c3 100644 --- a/database/migrations/2013_07_28_060804_create_albums.php +++ b/database/migrations/2013_07_28_060804_create_albums.php @@ -2,44 +2,47 @@ use Illuminate\Database\Migrations\Migration; -class CreateAlbums extends Migration { - public function up() { - Schema::create('albums', function($table) { - $table->increments('id'); - $table->integer('user_id')->unsigned(); - $table->string('title')->index(); - $table->string('slug')->index(); - $table->text('description'); - $table->integer('cover_id')->unsigned()->nullable(); +class CreateAlbums extends Migration +{ + public function up() + { + Schema::create('albums', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned(); + $table->string('title')->index(); + $table->string('slug')->index(); + $table->text('description'); + $table->integer('cover_id')->unsigned()->nullable(); - $table->integer('track_count')->unsigned(); - $table->integer('view_count')->unsigned(); - $table->integer('download_count')->unsigned(); - $table->integer('favourite_count')->unsigned(); - $table->integer('comment_count')->unsigned(); + $table->integer('track_count')->unsigned(); + $table->integer('view_count')->unsigned(); + $table->integer('download_count')->unsigned(); + $table->integer('favourite_count')->unsigned(); + $table->integer('comment_count')->unsigned(); - $table->timestamps(); - $table->timestamp('deleted_at')->nullable()->index(); + $table->timestamps(); + $table->timestamp('deleted_at')->nullable()->index(); - $table->foreign('cover_id')->references('id')->on('images'); - $table->foreign('user_id')->references('id')->on('users'); - }); + $table->foreign('cover_id')->references('id')->on('images'); + $table->foreign('user_id')->references('id')->on('users'); + }); - Schema::table('tracks', function($table) { - $table->integer('album_id')->unsigned()->nullable(); - $table->integer('track_number')->unsigned()->nullable(); + Schema::table('tracks', function ($table) { + $table->integer('album_id')->unsigned()->nullable(); + $table->integer('track_number')->unsigned()->nullable(); - $table->foreign('album_id')->references('id')->on('albums'); - }); - } + $table->foreign('album_id')->references('id')->on('albums'); + }); + } - public function down() { - Schema::table('tracks', function($table) { - $table->dropForeign('tracks_album_id_foreign'); - $table->dropColumn('album_id'); - $table->dropColumn('track_number'); - }); + public function down() + { + Schema::table('tracks', function ($table) { + $table->dropForeign('tracks_album_id_foreign'); + $table->dropColumn('album_id'); + $table->dropColumn('track_number'); + }); - Schema::drop('albums'); - } + Schema::drop('albums'); + } } \ No newline at end of file diff --git a/database/migrations/2013_07_28_135136_create_playlists.php b/database/migrations/2013_07_28_135136_create_playlists.php index 9c61a5a5..c07ef855 100644 --- a/database/migrations/2013_07_28_135136_create_playlists.php +++ b/database/migrations/2013_07_28_135136_create_playlists.php @@ -2,66 +2,69 @@ use Illuminate\Database\Migrations\Migration; -class CreatePlaylists extends Migration { - public function up() { - Schema::create('playlists', function($table) { - $table->increments('id'); - $table->integer('user_id')->unsigned()->index(); - $table->string('title'); - $table->string('slug'); - $table->text('description'); - $table->boolean('is_public'); +class CreatePlaylists extends Migration +{ + public function up() + { + Schema::create('playlists', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); + $table->string('title'); + $table->string('slug'); + $table->text('description'); + $table->boolean('is_public'); - $table->integer('track_count')->unsigned(); - $table->integer('view_count')->unsigned(); - $table->integer('download_count')->unsigned(); - $table->integer('favourite_count')->unsigned(); - $table->integer('follow_count')->unsigned(); - $table->integer('comment_count')->unsigned(); + $table->integer('track_count')->unsigned(); + $table->integer('view_count')->unsigned(); + $table->integer('download_count')->unsigned(); + $table->integer('favourite_count')->unsigned(); + $table->integer('follow_count')->unsigned(); + $table->integer('comment_count')->unsigned(); - $table->timestamps(); - $table->date('deleted_at')->nullable()->index(); + $table->timestamps(); + $table->date('deleted_at')->nullable()->index(); - $table->foreign('user_id')->references('id')->on('users')->on_update('cascade'); - }); + $table->foreign('user_id')->references('id')->on('users')->on_update('cascade'); + }); - Schema::create('playlist_track', function($table){ - $table->increments('id'); - $table->timestamps(); - $table->integer('playlist_id')->unsigned()->index(); - $table->integer('track_id')->unsigned()->index(); - $table->integer('position')->unsigned(); + Schema::create('playlist_track', function ($table) { + $table->increments('id'); + $table->timestamps(); + $table->integer('playlist_id')->unsigned()->index(); + $table->integer('track_id')->unsigned()->index(); + $table->integer('position')->unsigned(); - $table->foreign('playlist_id')->references('id')->on('playlists')->on_update('cascade')->on_delete('cascade'); - $table->foreign('track_id')->references('id')->on('tracks')->on_update('cascade'); - }); + $table->foreign('playlist_id')->references('id')->on('playlists')->on_update('cascade')->on_delete('cascade'); + $table->foreign('track_id')->references('id')->on('tracks')->on_update('cascade'); + }); - Schema::create('pinned_playlists', function($table) { - $table->increments('id'); - $table->integer('user_id')->unsigned()->index(); - $table->integer('playlist_id')->unsigned()->index(); - $table->timestamps(); + Schema::create('pinned_playlists', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); + $table->integer('playlist_id')->unsigned()->index(); + $table->timestamps(); - $table->foreign('user_id')->references('id')->on('users')->on_update('cascade'); - $table->foreign('playlist_id')->references('id')->on('playlists')->on_update('cascade'); - }); - } + $table->foreign('user_id')->references('id')->on('users')->on_update('cascade'); + $table->foreign('playlist_id')->references('id')->on('playlists')->on_update('cascade'); + }); + } - public function down() { - Schema::table('playlist_track', function($table){ - $table->dropForeign('playlist_track_playlist_id_foreign'); - $table->dropForeign('playlist_track_track_id_foreign'); - }); + public function down() + { + Schema::table('playlist_track', function ($table) { + $table->dropForeign('playlist_track_playlist_id_foreign'); + $table->dropForeign('playlist_track_track_id_foreign'); + }); - Schema::drop('playlist_track'); + Schema::drop('playlist_track'); - Schema::drop('pinned_playlists'); + Schema::drop('pinned_playlists'); - Schema::table('playlists', function($table){ - $table->dropForeign('playlists_user_id_foreign'); - }); + Schema::table('playlists', function ($table) { + $table->dropForeign('playlists_user_id_foreign'); + }); - Schema::drop('playlists'); - } + Schema::drop('playlists'); + } } \ No newline at end of file diff --git a/database/migrations/2013_08_01_051337_create_comments.php b/database/migrations/2013_08_01_051337_create_comments.php index d70491cb..b9a570ff 100644 --- a/database/migrations/2013_08_01_051337_create_comments.php +++ b/database/migrations/2013_08_01_051337_create_comments.php @@ -2,37 +2,40 @@ use Illuminate\Database\Migrations\Migration; -class CreateComments extends Migration { - public function up() { - Schema::create('comments', function($table){ - $table->increments('id'); - $table->integer('user_id')->unsigned(); - $table->string('ip_address', 46); - $table->text('content'); +class CreateComments extends Migration +{ + public function up() + { + Schema::create('comments', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned(); + $table->string('ip_address', 46); + $table->text('content'); - $table->timestamps(); - $table->timestamp('deleted_at')->nullable()->index(); + $table->timestamps(); + $table->timestamp('deleted_at')->nullable()->index(); - $table->integer('profile_id')->unsigned()->nullable()->index(); - $table->integer('track_id')->unsigned()->nullable()->index(); - $table->integer('album_id')->unsigned()->nullable()->index(); - $table->integer('playlist_id')->unsigned()->nullable()->index(); + $table->integer('profile_id')->unsigned()->nullable()->index(); + $table->integer('track_id')->unsigned()->nullable()->index(); + $table->integer('album_id')->unsigned()->nullable()->index(); + $table->integer('playlist_id')->unsigned()->nullable()->index(); - $table->foreign('profile_id')->references('id')->on('users'); - $table->foreign('user_id')->references('id')->on('users'); - $table->foreign('track_id')->references('id')->on('tracks'); - $table->foreign('album_id')->references('id')->on('albums'); - $table->foreign('playlist_id')->references('id')->on('playlists'); - }); - } + $table->foreign('profile_id')->references('id')->on('users'); + $table->foreign('user_id')->references('id')->on('users'); + $table->foreign('track_id')->references('id')->on('tracks'); + $table->foreign('album_id')->references('id')->on('albums'); + $table->foreign('playlist_id')->references('id')->on('playlists'); + }); + } - public function down() { - Schema::table('comments', function($table){ - $table->dropForeign('comments_user_id_foreign'); - $table->dropForeign('comments_track_id_foreign'); - $table->dropForeign('comments_album_id_foreign'); - $table->dropForeign('comments_playlist_id_foreign'); - }); - Schema::drop('comments'); - } + public function down() + { + Schema::table('comments', function ($table) { + $table->dropForeign('comments_user_id_foreign'); + $table->dropForeign('comments_track_id_foreign'); + $table->dropForeign('comments_album_id_foreign'); + $table->dropForeign('comments_playlist_id_foreign'); + }); + Schema::drop('comments'); + } } \ No newline at end of file diff --git a/database/migrations/2013_08_18_041928_create_user_tables.php b/database/migrations/2013_08_18_041928_create_user_tables.php index ac526370..2b83c0db 100644 --- a/database/migrations/2013_08_18_041928_create_user_tables.php +++ b/database/migrations/2013_08_18_041928_create_user_tables.php @@ -2,56 +2,59 @@ use Illuminate\Database\Migrations\Migration; -class CreateUserTables extends Migration { - public function up() { - Schema::create('resource_users', function($table){ - $table->increments('id'); - $table->integer('user_id')->unsigned()->index(); +class CreateUserTables extends Migration +{ + public function up() + { + Schema::create('resource_users', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); - $table->integer('track_id')->unsigned()->nullable()->index(); - $table->integer('album_id')->unsigned()->nullable()->index(); - $table->integer('playlist_id')->unsigned()->nullable()->index(); - $table->integer('artist_id')->unsigned()->nullable()->index(); + $table->integer('track_id')->unsigned()->nullable()->index(); + $table->integer('album_id')->unsigned()->nullable()->index(); + $table->integer('playlist_id')->unsigned()->nullable()->index(); + $table->integer('artist_id')->unsigned()->nullable()->index(); - $table->boolean('is_followed'); - $table->boolean('is_favourited'); - $table->boolean('is_pinned'); + $table->boolean('is_followed'); + $table->boolean('is_favourited'); + $table->boolean('is_pinned'); - $table->integer('view_count'); - $table->integer('play_count'); - $table->integer('download_count'); + $table->integer('view_count'); + $table->integer('play_count'); + $table->integer('download_count'); - $table->foreign('artist_id')->references('id')->on('users')->on_delete('cascade'); - $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); - $table->foreign('track_id')->references('id')->on('tracks')->on_delete('cascade');; - $table->foreign('album_id')->references('id')->on('albums')->on_delete('cascade');; - $table->foreign('playlist_id')->references('id')->on('playlists')->on_delete('cascade');; + $table->foreign('artist_id')->references('id')->on('users')->on_delete('cascade'); + $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); + $table->foreign('track_id')->references('id')->on('tracks')->on_delete('cascade');; + $table->foreign('album_id')->references('id')->on('albums')->on_delete('cascade');; + $table->foreign('playlist_id')->references('id')->on('playlists')->on_delete('cascade');; - $table->unique(['user_id', 'track_id', 'album_id', 'playlist_id', 'artist_id'], 'resource_unique'); - }); + $table->unique(['user_id', 'track_id', 'album_id', 'playlist_id', 'artist_id'], 'resource_unique'); + }); - Schema::create('resource_log_items', function($table){ - $table->increments('id'); - $table->integer('user_id')->unsigned()->nullable()->index(); - $table->integer('log_type')->unsigned(); - $table->string('ip_address', 46)->index(); - $table->integer('track_format_id')->unsigned()->nullable(); + Schema::create('resource_log_items', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->nullable()->index(); + $table->integer('log_type')->unsigned(); + $table->string('ip_address', 46)->index(); + $table->integer('track_format_id')->unsigned()->nullable(); - $table->integer('track_id')->unsigned()->nullable()->index(); - $table->integer('album_id')->unsigned()->nullable()->index(); - $table->integer('playlist_id')->unsigned()->nullable()->index(); + $table->integer('track_id')->unsigned()->nullable()->index(); + $table->integer('album_id')->unsigned()->nullable()->index(); + $table->integer('playlist_id')->unsigned()->nullable()->index(); - $table->timestamp('created_at'); + $table->timestamp('created_at'); - $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); - $table->foreign('track_id')->references('id')->on('tracks'); - $table->foreign('album_id')->references('id')->on('albums'); - $table->foreign('playlist_id')->references('id')->on('playlists'); - }); - } + $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); + $table->foreign('track_id')->references('id')->on('tracks'); + $table->foreign('album_id')->references('id')->on('albums'); + $table->foreign('playlist_id')->references('id')->on('playlists'); + }); + } - public function down() { - Schema::drop('resource_users'); - Schema::drop('resource_log_items'); - } + public function down() + { + Schema::drop('resource_users'); + Schema::drop('resource_log_items'); + } } \ No newline at end of file diff --git a/database/migrations/2013_08_18_045248_create_favourites.php b/database/migrations/2013_08_18_045248_create_favourites.php index 8901d451..7aea2c8a 100644 --- a/database/migrations/2013_08_18_045248_create_favourites.php +++ b/database/migrations/2013_08_18_045248_create_favourites.php @@ -1,34 +1,37 @@ increments('id'); - $table->integer('user_id')->unsigned()->index(); +class CreateFavourites extends Migration +{ + public function up() + { + Schema::create('favourites', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); - $table->integer('track_id')->unsigned()->nullable()->index(); - $table->integer('album_id')->unsigned()->nullable()->index(); - $table->integer('playlist_id')->unsigned()->nullable()->index(); + $table->integer('track_id')->unsigned()->nullable()->index(); + $table->integer('album_id')->unsigned()->nullable()->index(); + $table->integer('playlist_id')->unsigned()->nullable()->index(); - $table->timestamp('created_at'); + $table->timestamp('created_at'); - $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); - $table->foreign('track_id')->references('id')->on('tracks'); - $table->foreign('album_id')->references('id')->on('albums'); - $table->foreign('playlist_id')->references('id')->on('playlists'); - }); - } + $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); + $table->foreign('track_id')->references('id')->on('tracks'); + $table->foreign('album_id')->references('id')->on('albums'); + $table->foreign('playlist_id')->references('id')->on('playlists'); + }); + } - public function down() { - Schema::table('favourites', function($table){ - $table->dropForeign('favourites_user_id_foreign'); - $table->dropForeign('favourites_track_id_foreign'); - $table->dropForeign('favourites_album_id_foreign'); - $table->dropForeign('favourites_playlist_id_foreign'); - }); + public function down() + { + Schema::table('favourites', function ($table) { + $table->dropForeign('favourites_user_id_foreign'); + $table->dropForeign('favourites_track_id_foreign'); + $table->dropForeign('favourites_album_id_foreign'); + $table->dropForeign('favourites_playlist_id_foreign'); + }); - Schema::drop('favourites'); - } - } \ No newline at end of file + Schema::drop('favourites'); + } +} \ No newline at end of file diff --git a/database/migrations/2013_08_29_025516_create_followers.php b/database/migrations/2013_08_29_025516_create_followers.php index d9604534..7ff0c76b 100644 --- a/database/migrations/2013_08_29_025516_create_followers.php +++ b/database/migrations/2013_08_29_025516_create_followers.php @@ -2,24 +2,27 @@ use Illuminate\Database\Migrations\Migration; -class CreateFollowers extends Migration { - public function up() { - Schema::create('followers', function($table){ - $table->increments('id'); - $table->integer('user_id')->unsigned()->index(); +class CreateFollowers extends Migration +{ + public function up() + { + Schema::create('followers', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); - $table->integer('artist_id')->unsigned()->nullable()->index(); - $table->integer('playlist_id')->unsigned()->nullable()->index(); + $table->integer('artist_id')->unsigned()->nullable()->index(); + $table->integer('playlist_id')->unsigned()->nullable()->index(); - $table->timestamp('created_at'); + $table->timestamp('created_at'); - $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); - $table->foreign('artist_id')->references('id')->on('users')->on_delete('cascade'); - $table->foreign('playlist_id')->references('id')->on('playlists'); - }); - } + $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade'); + $table->foreign('artist_id')->references('id')->on('users')->on_delete('cascade'); + $table->foreign('playlist_id')->references('id')->on('playlists'); + }); + } - public function down() { - Schema::drop('followers'); - } + public function down() + { + Schema::drop('followers'); + } } \ No newline at end of file diff --git a/database/migrations/2013_09_01_025031_oauth.php b/database/migrations/2013_09_01_025031_oauth.php index 0606d77c..9d97cad5 100644 --- a/database/migrations/2013_09_01_025031_oauth.php +++ b/database/migrations/2013_09_01_025031_oauth.php @@ -2,21 +2,24 @@ use Illuminate\Database\Migrations\Migration; -class Oauth extends Migration { - public function up() { - Schema::create('oauth2_tokens', function($table) { - $table->increments('id'); - $table->integer('user_id'); - $table->integer('external_user_id'); - $table->text('access_token'); - $table->timestamp('expires'); - $table->text('refresh_token'); - $table->string('type'); - $table->string('service'); - }); - } +class Oauth extends Migration +{ + public function up() + { + Schema::create('oauth2_tokens', function ($table) { + $table->increments('id'); + $table->integer('user_id'); + $table->integer('external_user_id'); + $table->text('access_token'); + $table->timestamp('expires'); + $table->text('refresh_token'); + $table->string('type'); + $table->string('service'); + }); + } - public function down() { - Schema::drop('oauth2_tokens'); - } + public function down() + { + Schema::drop('oauth2_tokens'); + } } \ No newline at end of file diff --git a/database/migrations/2013_09_01_232520_create_news_table.php b/database/migrations/2013_09_01_232520_create_news_table.php index d6e9aa73..179a42b9 100644 --- a/database/migrations/2013_09_01_232520_create_news_table.php +++ b/database/migrations/2013_09_01_232520_create_news_table.php @@ -2,20 +2,23 @@ use Illuminate\Database\Migrations\Migration; -class CreateNewsTable extends Migration { - public function up() { - Schema::create('news', function($table){ - $table->increments('id'); - $table->integer('user_id')->unsigned()->index(); - $table->string('post_hash', 32)->index(); - $table->timestamps(); +class CreateNewsTable extends Migration +{ + public function up() + { + Schema::create('news', function ($table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->index(); + $table->string('post_hash', 32)->index(); + $table->timestamps(); - $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - }); - } + $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); + }); + } - public function down() { - Schema::drop('news'); - } + public function down() + { + Schema::drop('news'); + } } \ No newline at end of file diff --git a/database/migrations/2013_09_10_014644_create_latest_column.php b/database/migrations/2013_09_10_014644_create_latest_column.php index 38b8e6c7..d76b3b1c 100644 --- a/database/migrations/2013_09_10_014644_create_latest_column.php +++ b/database/migrations/2013_09_10_014644_create_latest_column.php @@ -2,13 +2,15 @@ use Illuminate\Database\Migrations\Migration; -class CreateLatestColumn extends Migration { - public function up() { - Schema::table('tracks', function($table) { - $table->boolean('is_latest')->notNullable()->indexed(); - }); +class CreateLatestColumn extends Migration +{ + public function up() + { + Schema::table('tracks', function ($table) { + $table->boolean('is_latest')->notNullable()->indexed(); + }); - DB::update(' + DB::update(' UPDATE tracks SET @@ -27,11 +29,12 @@ class CreateLatestColumn extends Migration { ) = tracks.id AND published_at IS NOT NULL'); - } + } - public function down() { - Schema::table('tracks', function($table) { - $table->dropColumn('is_latest'); - }); - } + public function down() + { + Schema::table('tracks', function ($table) { + $table->dropColumn('is_latest'); + }); + } } \ No newline at end of file diff --git a/database/migrations/2013_09_23_031316_create_track_hashes.php b/database/migrations/2013_09_23_031316_create_track_hashes.php index 88da6afa..6fe14832 100644 --- a/database/migrations/2013_09_23_031316_create_track_hashes.php +++ b/database/migrations/2013_09_23_031316_create_track_hashes.php @@ -1,23 +1,26 @@ string('hash', 32)->notNullable()->indexed(); - }); +class CreateTrackHashes extends Migration +{ + public function up() + { + Schema::table('tracks', function ($table) { + $table->string('hash', 32)->notNullable()->indexed(); + }); - foreach (Track::with('user')->get() as $track) { - $track->updateHash(); - $track->save(); - } - } + foreach (Track::with('user')->get() as $track) { + $track->updateHash(); + $track->save(); + } + } - public function down() { - Schema::table('tracks', function($table) { - $table->dropColumn('hash'); - }); - } + public function down() + { + Schema::table('tracks', function ($table) { + $table->dropColumn('hash'); + }); + } } \ No newline at end of file diff --git a/database/migrations/2013_09_24_055911_track_is_listed.php b/database/migrations/2013_09_24_055911_track_is_listed.php index 184e8b8d..25d8caa8 100644 --- a/database/migrations/2013_09_24_055911_track_is_listed.php +++ b/database/migrations/2013_09_24_055911_track_is_listed.php @@ -2,22 +2,25 @@ use Illuminate\Database\Migrations\Migration; -class TrackIsListed extends Migration { - public function up() { - Schema::table('tracks', function($table) { - $table->boolean('is_listed')->notNullable()->indexed(); - }); +class TrackIsListed extends Migration +{ + public function up() + { + Schema::table('tracks', function ($table) { + $table->boolean('is_listed')->notNullable()->indexed(); + }); - DB::update(' + DB::update(' UPDATE tracks SET is_listed = true'); - } + } - public function down() { - Schema::table('tracks', function($table) { - $table->dropColumn('is_listed'); - }); - } + public function down() + { + Schema::table('tracks', function ($table) { + $table->dropColumn('is_listed'); + }); + } } \ No newline at end of file diff --git a/database/migrations/2014_05_28_071738_update_track_hash.php b/database/migrations/2014_05_28_071738_update_track_hash.php index cbb72f79..6f2d43bb 100644 --- a/database/migrations/2014_05_28_071738_update_track_hash.php +++ b/database/migrations/2014_05_28_071738_update_track_hash.php @@ -1,16 +1,19 @@ get() as $track) { - $track->updateHash(); - $track->save(); - } - } +class UpdateTrackHash extends Migration +{ + public function up() + { + foreach (Track::with('user')->get() as $track) { + $track->updateHash(); + $track->save(); + } + } - public function down() { - } + public function down() + { + } } \ No newline at end of file diff --git a/database/migrations/2015_04_30_064436_add_remember_me_field.php b/database/migrations/2015_04_30_064436_add_remember_me_field.php index 1e400d3b..00f2b6f0 100644 --- a/database/migrations/2015_04_30_064436_add_remember_me_field.php +++ b/database/migrations/2015_04_30_064436_add_remember_me_field.php @@ -2,16 +2,19 @@ use Illuminate\Database\Migrations\Migration; -class AddRememberMeField extends Migration { - public function up() { - Schema::table('users', function($table) { - $table->string('remember_token', 100)->nullable()->indexed(); - }); - } +class AddRememberMeField extends Migration +{ + public function up() + { + Schema::table('users', function ($table) { + $table->string('remember_token', 100)->nullable()->indexed(); + }); + } - public function down() { - Schema::table('users', function($table) { - $table->dropColumn('remember_token'); - }); - } + public function down() + { + Schema::table('users', function ($table) { + $table->dropColumn('remember_token'); + }); + } } \ No newline at end of file diff --git a/database/migrations/2015_05_20_155236_add_archived_profile_field.php b/database/migrations/2015_05_20_155236_add_archived_profile_field.php index 6dfa4b13..6fe301af 100644 --- a/database/migrations/2015_05_20_155236_add_archived_profile_field.php +++ b/database/migrations/2015_05_20_155236_add_archived_profile_field.php @@ -2,30 +2,31 @@ use Illuminate\Database\Migrations\Migration; -class AddArchivedProfileField extends Migration { +class AddArchivedProfileField extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('users', function ( $table ) { - $table->boolean( 'is_archived' )->default(false); - } ); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('users', function ($table) { + $table->boolean('is_archived')->default(false); + }); + } - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table( 'users', function ( $table ) { - $table->dropColumn( 'is_archived' ); - } ); - } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function ($table) { + $table->dropColumn('is_archived'); + }); + } } \ No newline at end of file diff --git a/database/migrations/2015_05_25_011121_create_track_files_table.php b/database/migrations/2015_05_25_011121_create_track_files_table.php index 2354fb66..6ac15cd3 100644 --- a/database/migrations/2015_05_25_011121_create_track_files_table.php +++ b/database/migrations/2015_05_25_011121_create_track_files_table.php @@ -1,5 +1,6 @@