mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 12:44:35 -04:00
Fix for migration
This commit is contained in:
parent
cfe35723ea
commit
ea6fdeefa8
@ -12,40 +12,44 @@ class AddInvoiceSignature extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('invitations', function($table)
|
||||
if ( ! Schema::hasColumn('invitations', 'signature_base64'))
|
||||
{
|
||||
$table->text('signature_base64')->nullable();
|
||||
$table->timestamp('signature_date')->nullable();
|
||||
});
|
||||
Schema::table('invitations', function($table)
|
||||
{
|
||||
$table->text('signature_base64')->nullable();
|
||||
$table->timestamp('signature_date')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('companies', function($table)
|
||||
{
|
||||
$table->string('utm_source')->nullable();
|
||||
$table->string('utm_medium')->nullable();
|
||||
$table->string('utm_campaign')->nullable();
|
||||
$table->string('utm_term')->nullable();
|
||||
$table->string('utm_content')->nullable();
|
||||
});
|
||||
Schema::table('companies', function($table)
|
||||
{
|
||||
$table->string('utm_source')->nullable();
|
||||
$table->string('utm_medium')->nullable();
|
||||
$table->string('utm_campaign')->nullable();
|
||||
$table->string('utm_term')->nullable();
|
||||
$table->string('utm_content')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->dropForeign('payment_methods_account_gateway_token_id_foreign');
|
||||
});
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->unsignedInteger('account_gateway_token_id')->nullable()->change();
|
||||
$table->dropForeign('payment_methods_account_gateway_token_id_foreign');
|
||||
});
|
||||
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->foreign('account_gateway_token_id')->references('id')->on('account_gateway_tokens')->onDelete('cascade');
|
||||
});
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->foreign('account_gateway_token_id')->references('id')->on('account_gateway_tokens')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->dropForeign('payments_payment_method_id_foreign');
|
||||
});
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->dropForeign('payments_payment_method_id_foreign');
|
||||
});
|
||||
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->foreign('payment_method_id')->references('id')->on('payment_methods')->onDelete('cascade');;
|
||||
});
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->foreign('payment_method_id')->references('id')->on('payment_methods')->onDelete('cascade');;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user