Update namespace to App

This commit is contained in:
Kelvin Zhang 2015-08-31 13:35:47 +01:00
parent 14125fb5c6
commit 39290f8204
37 changed files with 921 additions and 821 deletions

View file

@ -1,5 +1,8 @@
<?php
namespace App;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
@ -36,32 +39,32 @@ class Album extends Model
public function user()
{
return $this->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)

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
@ -14,27 +16,27 @@ class Comment extends Model
public function user()
{
return $this->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)

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Favourite extends Model
@ -15,22 +17,22 @@ class Favourite extends Model
public function user()
{
return $this->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');
}
/**

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Follower extends Model

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Traits\SlugTrait;

View file

@ -1,5 +1,8 @@
<?php
namespace App;
use External;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\URL;

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class License extends Model

View file

@ -1,7 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;
use SimplePie;
class News extends Model
{

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PinnedPlaylist extends Model
@ -8,11 +10,11 @@ class PinnedPlaylist extends Model
public function user()
{
return $this->belongsTo('User');
return $this->belongsTo('App\User');
}
public function playlist()
{
return $this->belongsTo('Playlist');
return $this->belongsTo('App\Playlist');
}
}

View file

@ -1,5 +1,8 @@
<?php
namespace App;
use Helpers;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
@ -124,7 +127,7 @@ class Playlist extends Model
public function tracks()
{
return $this
->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)

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Support\Facades\DB;
class ProfileRequest

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ResourceUser extends Model

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ShowSong extends Model

View file

@ -1,5 +1,11 @@
<?php
namespace App;
use Exception;
use External;
use getid3_writetags;
use Helpers;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
@ -321,52 +327,52 @@ class Track extends Model
public function genre()
{
return $this->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()

View file

@ -1,5 +1,8 @@
<?php
namespace App;
use Helpers;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Cache;
@ -9,7 +12,7 @@ class TrackFile extends Model
{
public function track()
{
return $this->belongsTo('Track');
return $this->belongsTo('App\Track');
}
/**

View file

@ -1,5 +1,7 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class TrackType extends Model

View file

@ -1,5 +1,9 @@
<?php
namespace App;
use Exception;
use Gravatar;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
@ -31,17 +35,17 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
public function avatar()
{
return $this->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()

View file

@ -1,57 +1,60 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
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();
});
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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -1,34 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Migrations\Migration;
class CreateFavourites extends Migration {
public function up() {
Schema::create('favourites', function($table){
$table->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');
}
}
Schema::drop('favourites');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
}
}

View file

@ -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');
});
}
}

View file

@ -1,23 +1,26 @@
<?php
use Entities\Track;
use Illuminate\Database\Migrations\Migration;
use App\Track;
use Illuminate\Database\Migrations\Migration;
class CreateTrackHashes extends Migration {
public function up() {
Schema::table('tracks', function($table) {
$table->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');
});
}
}

View file

@ -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');
});
}
}

View file

@ -1,16 +1,19 @@
<?php
use App\Track;
use Illuminate\Database\Migrations\Migration;
use Entities\Track;
class UpdateTrackHash extends Migration {
public function up() {
foreach (Track::with('user')->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()
{
}
}

View file

@ -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');
});
}
}

View file

@ -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');
});
}
}

View file

@ -1,5 +1,6 @@
<?php
use App\Track;
use Illuminate\Database\Migrations\Migration;