2015-04-13 11:23:43 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
class InvoicesFile extends Migration {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::table('invoice_designs', function($table)
|
|
|
|
{
|
|
|
|
$table->text('filename')->nullable();
|
|
|
|
});
|
|
|
|
|
|
|
|
DB::table('invoice_designs')->where('id', 1)->update([
|
|
|
|
'filename'=>'js/templates/clean.js'
|
|
|
|
]);
|
2015-04-16 23:33:22 +02:00
|
|
|
DB::table('invoice_designs')->where('id', 2)->update([
|
|
|
|
'filename'=>'js/templates/bold.js'
|
|
|
|
]);
|
|
|
|
DB::table('invoice_designs')->where('id', 3)->update([
|
|
|
|
'filename'=>'js/templates/modern.js'
|
|
|
|
]);
|
|
|
|
DB::table('invoice_designs')->where('id', 4)->update([
|
|
|
|
'filename'=>'js/templates/plain.js'
|
|
|
|
]);
|
2015-04-13 11:23:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::table('invoice_designs', function($table)
|
|
|
|
{
|
|
|
|
$table->dropColumn('filename');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|