feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema.
This commit is contained in:
@@ -14,9 +14,16 @@ return new class extends Migration
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('discount_customer',function (Blueprint $table) {
|
||||
$table->bigInteger('discount_id')->default(0)->index();
|
||||
$table->bigInteger('customer_id')->default(0)->index();
|
||||
Schema::create('discount_customer', function (Blueprint $table) {
|
||||
$table->foreignId('discount_id')
|
||||
->constrained('discount')
|
||||
->cascadeOnDelete();
|
||||
|
||||
$table->foreignId('customer_id')
|
||||
->constrained('user')
|
||||
->cascadeOnDelete();
|
||||
|
||||
$table->primary(['discount_id', 'customer_id']);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,9 +34,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('discount_customer',function (Blueprint $table) {
|
||||
$table->dropForeign(['discount_id','customer_id']);
|
||||
$table->drop();
|
||||
});
|
||||
Schema::dropIfExists('discount_customer');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user