1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
invoiceninja/database/migrations/2016_05_24_164847_wepay_ach.php

60 lines
1.5 KiB
PHP
Raw Normal View History

2016-05-24 20:16:42 +02:00
<?php
use Illuminate\Database\Migrations\Migration;
2017-01-30 20:40:43 +01:00
use Illuminate\Database\Schema\Blueprint;
2016-05-24 20:16:42 +02:00
class WepayAch extends Migration
2016-05-24 20:16:42 +02:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
2017-01-30 17:05:31 +01:00
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
});
2017-01-30 17:05:31 +01:00
Schema::table('payment_methods', function ($table) {
2016-05-24 20:16:42 +02:00
$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
});
2017-01-30 17:05:31 +01:00
Schema::table('payments', function ($table) {
2016-05-24 20:16:42 +02:00
$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
});
2017-01-30 17:05:31 +01:00
Schema::table('accounts', function ($table) {
2016-05-24 20:16:42 +02:00
$table->boolean('auto_bill_on_due_date')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2017-01-30 17:05:31 +01:00
Schema::table('contacts', function (Blueprint $table) {
$table->dropColumn('contact_key');
2016-05-24 20:16:42 +02:00
});
2017-01-30 17:05:31 +01: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
});
2017-01-30 17:05:31 +01:00
Schema::table('payment_methods', function ($table) {
2016-05-25 04:49:06 +02:00
$table->dropColumn('bank_name');
$table->dropColumn('ip');
});
2017-01-30 17:05:31 +01:00
Schema::table('accounts', function ($table) {
2016-05-25 04:49:06 +02:00
$table->dropColumn('auto_bill_on_due_date');
2016-05-24 20:16:42 +02:00
});
}
}