mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'master' into dillon/66.1-payment-bank-details
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateVoucherCampaignsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('voucher_campaigns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('campaign_id');
|
||||
$table->string('name');
|
||||
$table->string('slug')->unique();
|
||||
$table->text('description')->nullable();
|
||||
$table->integer('limit_per_month')->default(0);
|
||||
$table->boolean('is_display')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('voucher_campaigns');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddVoucherCampaignIdToVouchersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('vouchers', function (Blueprint $table) {
|
||||
$table->foreignId('voucher_campaign_id')->nullable()->constrained('voucher_campaigns')->onDelete('set null');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('vouchers', function (Blueprint $table) {
|
||||
$table->dropForeign(['voucher_campaign_id']);
|
||||
$table->dropColumn('voucher_campaign_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,9 @@ class AdminUserPermissionsTableSeeder extends Seeder
|
||||
['name' => 'delete milestone', 'guard_name' => 'web'],
|
||||
['name' => 'delete reward', 'guard_name' => 'web'],
|
||||
|
||||
['name' => 'add voucher', 'guard_name' => 'web'],
|
||||
['name' => 'list voucher campaigns', 'guard_name' => 'web'],
|
||||
|
||||
['name' => 'update bank_metadata', 'guard_name' => 'web'],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user