Add per-store managers for Woo Business accounts.
Deploy Ladill Woo Manager / deploy (push) Successful in 39s
Deploy Ladill Woo Manager / deploy (push) Successful in 39s
Agencies can invite store-scoped managers via Identity, with access limited to one WooCommerce store while owners retain full multi-store control. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('woo_store_members', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('owner_ref')->index();
|
||||
$table->string('user_ref')->index();
|
||||
$table->foreignId('woo_store_id')->constrained('woo_stores')->cascadeOnDelete();
|
||||
$table->string('role', 30)->default('manager');
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['owner_ref', 'user_ref', 'woo_store_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('woo_store_members');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user