invoiceninja/database/migrations/2014_04_29_174315_add_advanced_settings.php

38 lines
900 B
PHP
Raw Permalink Normal View History

2015-03-17 07:45:25 +10:00
<?php
use Illuminate\Database\Migrations\Migration;
2017-01-30 18:05:31 +02:00
class AddAdvancedSettings extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('accounts', function ($table) {
$table->string('primary_color')->nullable();
$table->string('secondary_color')->nullable();
});
2015-03-17 07:45:25 +10:00
2017-01-30 18:05:31 +02:00
Schema::table('payments', function ($table) {
$table->dropForeign('payments_invoice_id_foreign');
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
});
}
2015-03-17 07:45:25 +10:00
2017-01-30 18:05:31 +02:00
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('accounts', function ($table) {
$table->dropColumn('primary_color');
$table->dropColumn('secondary_color');
});
}
2015-03-17 07:45:25 +10:00
}