PATH:
home
/
lab2454c
/
costbloc.com
/
Modules
/
Coupon
/
Database
/
Migrations
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateCouponsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('coupons', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name', 120)->index(); $table->bigInteger('vendor_id')->nullable()->index(); $table->bigInteger('shop_id')->nullable()->index(); $table->integer('usage_limit')->nullable()->index(); $table->decimal('minimum_spend', 16, 8)->nullable(); $table->integer('usage_count')->nullable(); $table->string('code', 100)->index(); $table->string('discount_type', 15)->index(); $table->decimal('discount_amount', 16, 8)->index(); $table->decimal('maximum_discount_amount', 16, 8)->nullable(); $table->date('start_date')->index(); $table->date('end_date')->index(); $table->string('status', 10)->default('Inactive')->index(); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->useCurrentOnUpdate()->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('coupons'); } }
[-] 2021_11_25_072819_coupon_trigger.php
[edit]
[-] 2021_10_10_065932_add_foreign_keys_to_product_coupons_table.php
[edit]
[-] 2021_10_10_065931_create_product_coupons_table.php
[edit]
[+]
..
[-] 2021_10_10_065928_add_foreign_keys_to_coupons_table.php
[edit]
[-] 2022_09_05_073603_add_foreign_keys_to_coupons_meta_table.php
[edit]
[-] 2021_10_10_065929_create_coupon_redeems_table.php
[edit]
[-] 2021_10_10_065927_create_coupons_table.php
[edit]
[-] 2021_10_10_065930_add_foreign_keys_to_coupon_redeems_table.php
[edit]
[-] 2022_09_04_050839_create_coupons_meta_table.php
[edit]