1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/database/migrations/2016_05_24_164847_wepay_ach.php

63 lines
1.5 KiB
PHP
Raw Normal View History

2016-05-24 20:16:42 +02:00
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class WepayAch extends Migration
2016-05-24 20:16:42 +02:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('contacts', function(Blueprint $table) {
2016-05-25 04:49:06 +02:00
$table->string('contact_key')->nullable()->default(null)->index()->unique();
2016-05-24 20:16:42 +02:00
});
Schema::table('payment_methods', function($table)
{
$table->string('bank_name')->nullable();
2016-05-25 04:49:06 +02:00
$table->string('ip')->nullable();
2016-05-24 20:16:42 +02:00
});
Schema::table('payments', function($table)
{
$table->string('bank_name')->nullable();
2016-05-25 04:49:06 +02:00
$table->string('ip')->nullable();
2016-05-24 20:16:42 +02:00
});
Schema::table('accounts', function($table)
{
$table->boolean('auto_bill_on_due_date')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('contacts', function(Blueprint $table) {
2016-05-25 04:49:06 +02:00
$table->dropColumn('contact_key');
2016-05-24 20:16:42 +02:00
});
Schema::table('payments', function($table) {
2016-05-25 04:49:06 +02:00
$table->dropColumn('bank_name');
$table->dropColumn('ip');
2016-05-24 20:16:42 +02:00
});
Schema::table('payment_methods', function($table) {
2016-05-25 04:49:06 +02:00
$table->dropColumn('bank_name');
$table->dropColumn('ip');
});
Schema::table('accounts', function($table) {
$table->dropColumn('auto_bill_on_due_date');
2016-05-24 20:16:42 +02:00
});
}
}