Fix migration scripts

This commit is contained in:
An Phan 2016-03-20 21:54:52 +08:00
parent a9ef743b88
commit 36b6d9e17a
2 changed files with 33 additions and 2 deletions

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddTrackIntoSongs extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('songs', function (Blueprint $table) {
$table->integer('track')->after('length')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('songs', function (Blueprint $table) {
$table->dropColumn('track');
});
}
}

View file

@ -46,7 +46,7 @@
</div>
<div class="form-row" v-show="editSingle">
<label>Track</label>
<input type="text" v-model="formData.track">
<input type="number" min="1" v-model="formData.track">
</div>
</div>
<div v-show="currentView === 'lyrics' && editSingle">
@ -274,7 +274,7 @@
padding: 16px;
}
input[type="text"], textarea {
input[type="text"], input[type="number"], textarea {
border: 1px solid #ccc;
width: 100%;
max-width: 100%;