#86: Migration improvements

This commit is contained in:
Josef Citrine 2016-07-17 23:31:14 +01:00
parent c3ad562a8e
commit e4fe1dc0e8
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ class CreateFavouritesTable extends Migration {
$table->integer('track_id')->unsigned()->nullable()->index(); $table->integer('track_id')->unsigned()->nullable()->index();
$table->integer('album_id')->unsigned()->nullable()->index(); $table->integer('album_id')->unsigned()->nullable()->index();
$table->integer('playlist_id')->unsigned()->nullable()->index(); $table->integer('playlist_id')->unsigned()->nullable()->index();
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'))->nullable(); $table->dateTime('created_at')->default('now()')->nullable();
}); });
} }

View file

@ -23,7 +23,7 @@ class CreateImagesTable2 extends Migration {
$table->string('filename', 256); $table->string('filename', 256);
$table->string('mime', 100); $table->string('mime', 100);
$table->string('extension', 32); $table->string('extension', 32);
$table->integer('size'); $table->unsignedInteger('size');
$table->string('hash', 32)->index(); $table->string('hash', 32)->index();
$table->unsignedInteger('uploaded_by')->index(); $table->unsignedInteger('uploaded_by')->index();
$table->timestamps(); $table->timestamps();

View file

@ -15,7 +15,7 @@ class CreateSessionsTable extends Migration {
Schema::create('sessions', function(Blueprint $table) Schema::create('sessions', function(Blueprint $table)
{ {
$table->string('id')->unique(); $table->string('id')->unique();
$table->text('payload', 65535); $table->text('payload');
$table->integer('last_activity'); $table->integer('last_activity');
}); });
} }