invoiceninja/database/migrations/2014_10_22_174452_add_affiliate_price.php

39 lines
801 B
PHP
Raw 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 AddAffiliatePrice extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
2015-03-17 07:45:25 +10:00
{
2017-01-30 18:05:31 +02:00
Schema::table('affiliates', function ($table) {
$table->decimal('price', 7, 2)->nullable();
});
2015-03-17 07:45:25 +10:00
2017-01-30 18:05:31 +02:00
Schema::table('licenses', function ($table) {
$table->unsignedInteger('product_id')->nullable();
});
}
2015-03-17 07:45:25 +10:00
2017-01-30 18:05:31 +02:00
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
2015-03-17 07:45:25 +10:00
{
2017-01-30 18:05:31 +02:00
Schema::table('affiliates', function ($table) {
$table->dropColumn('price');
});
2015-03-17 07:45:25 +10:00
2017-01-30 18:05:31 +02:00
Schema::table('licenses', function ($table) {
$table->dropColumn('product_id');
});
}
2015-03-17 07:45:25 +10:00
}