invoiceninja/database/migrations/2015_02_12_102940_add_email_templates.php

37 lines
916 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 AddEmailTemplates extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('accounts', function ($table) {
2015-03-17 07:45:25 +10:00
$table->text('email_template_invoice')->nullable();
$table->text('email_template_quote')->nullable();
$table->text('email_template_payment')->nullable();
});
2017-01-30 18:05:31 +02:00
}
2015-03-17 07:45:25 +10:00
2017-01-30 18:05:31 +02:00
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2017-04-06 21:42:57 +03:00
if (Schema::hasColumn('accounts', 'email_template_invoice')) {
Schema::table('accounts', function ($table) {
$table->dropColumn('email_template_invoice');
$table->dropColumn('email_template_quote');
$table->dropColumn('email_template_payment');
});
}
2017-01-30 18:05:31 +02:00
}
2015-03-17 07:45:25 +10:00
}