{"tool":"phpunit","result":"failed","tests":1,"passed":0,"assertions":2,"duration_ms":10483,"failed":1,"failures":[{"test":"Tests\\Feature\\ActivityManagementTest::test_activity_cannot_be_read_from_another_branch","file":"C:\\laragon\\www\\crm-test\\tests\\Feature\\ActivityManagementTest.php","line":41,"message":"Failed asserting that '\\n\n\\n\n
\\n\n \\n\n \\n\n\\n\n\\n\n Undefined variable $slot\\n\n
\\n\nIlluminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(integer, string, string, integer)46 <div class="col-6 col-md-2">47 <label class="form-label small text-muted mb-1">{{ __('crm.date_to') }}</label>48 <input type="date" name="to" value="{{ request('to') }}" class="form-control form-control-sm">49 </div>50 @endif51 {{ $slot }}52 <div class="col-auto d-flex gap-2">53 <button class="btn btn-sm btn-primary">{{ __('crm.filter') }}</button>54 <a class="btn btn-sm btn-outline-secondary" href="{{ $action ?? url()->current() }}">{{ __('crm.reset') }}</a>55 </div>56 </form>57 </div>58</div>59require(string)Illuminate\\Filesystem\\Filesystem::Illuminate\\Filesystem\\{closure}()Illuminate\\Filesystem\\Filesystem->getRequire(string, array)Illuminate\\View\\Engines\\PhpEngine->evaluatePath(string, array)Illuminate\\View\\Engines\\CompilerEngine->get(string, array)Illuminate\\View\\View->getContents()Illuminate\\View\\View->renderContents()Illuminate\\View\\View->render()11])12<div class="row g-2 mb-3">13 <div class="col-6"><div class="metric-card"><div class="metric-card__label">{{ __('activity.open_count') }}</div><div class="metric-card__value">{{ $openCount }}</div></div></div>14 <div class="col-6"><div class="metric-card metric-card--alert"><div class="metric-card__label">{{ __('activity.overdue_count') }}</div><div class="metric-card__value">{{ $overdueCount }}</div></div></div>15</div>16@include('components.crm-filters', [17 'action' => route('activities.index'),18 'owners' => $owners,19 'statuses' => ['pending', 'in_progress', 'completed', 'cancelled'],20 'statusPrefix' => 'activity',21])22<div class="card">23 <div class="table-responsive desktop-table">24 <table class="table align-middle mb-0">25 <thead><tr><th>{{ __('activity.subject') }}</th><th>{{ __('activity.type') }}</th><th>{{ __('crm.status') }}</th><th>{{ __('activity.related_to') }}</th><th>{{ __('activity.assigned_to') }}</th><th>{{ __('activity.due_at') }}</th><th class="text-end">{{ __('crm.actions') }}</th></tr></thead>26 <tbody>27 @forelse($activities as $activity)28require(string)Illuminate\\Filesystem\\Filesystem::Illuminate\\Filesystem\\{closure}()Illuminate\\Filesystem\\Filesystem->getRequire(string, array)Illuminate\\View\\Engines\\PhpEngine->evaluatePath(string, array)Illuminate\\View\\Engines\\CompilerEngine->get(string, array)Illuminate\\View\\View->getContents()Illuminate\\View\\View->renderContents()Illuminate\\View\\View->render()Illuminate\\Http\\Response->setContent(object(Illuminate\\View\\View))Illuminate\\Http\\Response->__construct(object(Illuminate\\View\\View), integer, array)Illuminate\\Routing\\Router::toResponse(object(Illuminate\\Http\\Request), object(Illuminate\\View\\View))Illuminate\\Routing\\Router->prepareResponse(object(Illuminate\\Http\\Request), object(Illuminate\\View\\View))Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))9class SecurityHeaders10{11 public function handle(Request $request, Closure $next): Response12 {13 /** @var Response $response */14 $response = $next($request);1516 $response->headers->set('X-Content-Type-Options', 'nosniff');17 $response->headers->set('X-Frame-Options', 'DENY');18 $response->headers->set('Referrer-Policy', 'strict-origin-when-cross-origin');19 $response->headers->set('Permissions-Policy', 'camera=(), microphone=(), geolocation=()');20 $response->headers->set(21 'Content-Security-Policy',22 "default-src 'self'; img-src 'self' data:; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"23 );2425 return $response;26App\\Http\\Middleware\\SecurityHeaders->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))1<?php2namespace App\\Http\\Middleware;3use Closure; use Illuminate\\Http\\Request; use Symfony\\Component\\HttpFoundation\\Response;4class SetLocale {public function handle(Request $request,Closure $next):Response{$locale=session('locale',$request->user()?->locale??'en');if(!in_array($locale,['en','ar'],true))$locale='en';app()->setLocale($locale);return $next($request);}}5App\\Http\\Middleware\\SetLocale->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Auth\\Middleware\\Authenticate->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Middleware\\PreventRequestForgery->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(object(Illuminate\\Http\\Request), object(Illuminate\\Session\\Store), object(Closure))Illuminate\\Session\\Middleware\\StartSession->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Pipeline\\Pipeline->then(object(Closure))Illuminate\\Routing\\Router->runRouteWithinStack(object(Illuminate\\Routing\\Route), object(Illuminate\\Http\\Request))Illuminate\\Routing\\Router->runRoute(object(Illuminate\\Http\\Request), object(Illuminate\\Routing\\Route))Illuminate\\Routing\\Router->dispatchToRoute(object(Illuminate\\Http\\Request))Illuminate\\Routing\\Router->dispatch(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Http\\Middleware\\ValidatePostSize->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Http\\Middleware\\HandleCors->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Http\\Middleware\\TrustProxies->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Middleware\\InvokeDeferredCallbacks->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Http\\Middleware\\ValidatePathEncoding->handle(object(Illuminate\\Http\\Request), object(Closure))Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(object(Illuminate\\Http\\Request))Illuminate\\Pipeline\\Pipeline->then(object(Closure))Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Http\\Kernel->handle(object(Illuminate\\Http\\Request))Illuminate\\Foundation\\Testing\\TestCase->call(string, string, array, array, array, array)Illuminate\\Foundation\\Testing\\TestCase->get(string)49 'status' => 'pending',50 'priority' => 'normal',51 ]);5253 $this->actingAs($user)->get(route('activities.show', $activity))->assertForbidden();54 $this->actingAs($user)->get(route('activities.index'))->assertDontSee('Hidden Activity');55 }5657 public function test_activity_company_must_belong_to_same_branch(): void58 {59 $user = $this->userWithActivityPermissions();60 $otherBranch = Branch::create(['name' => 'Riyadh', 'code' => 'RUH']);61 $outsiderCompany = Company::create(['branch_id' => $otherBranch->id, 'name' => 'Other Co', 'status' => 'active']);6263 $this->actingAs($user)->post(route('activities.store'), [64 'subject' => 'Invalid Activity',65 'type' => 'task',66Tests\\Feature\\ActivityManagementTest->test_activity_cannot_be_read_from_another_branch()PHPUnit\\Framework\\TestCase->invokeTestMethod(string, array)PHPUnit\\Framework\\TestCase->runTest()PHPUnit\\Framework\\TestCase->runBare()PHPUnit\\Framework\\TestRunner->run(object(Tests\\Feature\\ActivityManagementTest))PHPUnit\\Framework\\TestCase->run()PHPUnit\\Framework\\TestSuite->run()PHPUnit\\Framework\\TestSuite->run()PHPUnit\\Framework\\TestSuite->run()PHPUnit\\TextUI\\TestRunner->run(object(PHPUnit\\TextUI\\Configuration\\Configuration), object(PHPUnit\\Runner\\ResultCache\\DefaultResultCache), object(PHPUnit\\Framework\\TestSuite))select exists (select 1 from "main".sqlite_master where name = 'migrations' and type = 'table') as "exists"select exists (select 1 from "main".sqlite_master where name = 'migrations' and type = 'table') as "exists"select exists (select 1 from "main".sqlite_master where name = 'migrations' and type = 'table') as "exists"create table "migrations" ("id" integer primary key autoincrement not null, "migration" varchar not null, "batch" integer not null)select exists (select 1 from "main".sqlite_master where name = 'migrations' and type = 'table') as "exists"select "migration" from "migrations" order by "batch" asc, "migration" ascselect "migration" from "migrations" order by "batch" asc, "migration" ascselect max("batch") as "aggregate" from "migrations"create table "users" ("id" integer primary key autoincrement not null, "name" varchar not null, "email" varchar not null, "email_verified_at" datetime, "password" varchar not null, "remember_token" varchar, "created_at" datetime, "updated_at" datetime)create unique index "users_email_unique" on "users" ("email")create table "password_reset_tokens" ("email" varchar not null, "token" varchar not null, "created_at" datetime, primary key ("email"))create table "sessions" ("id" varchar not null, "user_id" integer, "ip_address" varchar, "user_agent" text, "payload" text not null, "last_activity" integer not null, primary key ("id"))create index "sessions_user_id_index" on "sessions" ("user_id")create index "sessions_last_activity_index" on "sessions" ("last_activity")insert into "migrations" ("migration", "batch") values ('0001_01_01_000000_create_users_table', 1)create table "cache" ("key" varchar not null, "value" text not null, "expiration" integer not null, primary key ("key"))create index "cache_expiration_index" on "cache" ("expiration")create table "cache_locks" ("key" varchar not null, "owner" varchar not null, "expiration" integer not null, primary key ("key"))create index "cache_locks_expiration_index" on "cache_locks" ("expiration")insert into "migrations" ("migration", "batch") values ('0001_01_01_000001_create_cache_table', 1)create table "jobs" ("id" integer primary key autoincrement not null, "queue" varchar not null, "payload" text not null, "attempts" integer not null, "reserved_at" integer, "available_at" integer not null, "created_at" integer not null)create index "jobs_queue_index" on "jobs" ("queue")create table "job_batches" ("id" varchar not null, "name" varchar not null, "total_jobs" integer not null, "pending_jobs" integer not null, "failed_jobs" integer not null, "failed_job_ids" text not null, "options" text, "cancelled_at" integer, "created_at" integer not null, "finished_at" integer, primary key ("id"))create table "failed_jobs" ("id" integer primary key autoincrement not null, "uuid" varchar not null, "connection" varchar not null, "queue" varchar not null, "payload" text not null, "exception" text not null, "failed_at" datetime not null default CURRENT_TIMESTAMP)create index "failed_jobs_connection_queue_failed_at_index" on "failed_jobs" ("connection", "queue", "failed_at")create unique index "failed_jobs_uuid_unique" on "failed_jobs" ("uuid")insert into "migrations" ("migration", "batch") values ('0001_01_01_000002_create_jobs_table', 1)create table "branches" ("id" integer primary key autoincrement not null, "name" varchar not null, "code" varchar not null, "timezone" varchar not null default 'Africa/Cairo', "is_active" tinyint(1) not null default '1', "created_at" datetime, "updated_at" datetime)create unique index "branches_code_unique" on "branches" ("code")create table "roles" ("id" integer primary key autoincrement not null, "name" varchar not null, "slug" varchar not null, "created_at" datetime, "updated_at" datetime)create unique index "roles_slug_unique" on "roles" ("slug")create table "permissions" ("id" integer primary key autoincrement not null, "name" varchar not null, "module" varchar not null, "created_at" datetime, "updated_at" datetime)create unique index "permissions_name_unique" on "permissions" ("name")create table "permission_role" ("permission_id" integer not null, "role_id" integer not null, foreign key("permission_id") references "permissions"("id") on delete cascade, foreign key("role_id") references "roles"("id") on delete cascade, primary key ("permission_id", "role_id"))select name, type, not "notnull" as "nullable", dflt_value as "default", pk as "primary", hidden as "extra" from pragma_table_xinfo('users', 'main') order by cid ascselect "sql" from "main".sqlite_master where type = 'table' and name = 'users'select 'primary' as name, group_concat(col) as columns, 1 as "unique", 1 as "primary" from (select name as col from pragma_table_xinfo('users', 'main') where pk > 0 order by pk, cid) group by name union select name, group_concat(col) as columns, "unique", origin = 'pk' as "primary" from (select il.*, ii.name as col from pragma_index_list('users', 'main') il, pragma_index_info(il.name, 'main') ii order by il.seq, ii.seqno) group by name, "unique", "primary"select group_concat("from") as columns, 'main' as foreign_schema, "table" as foreign_table, group_concat("to") as foreign_columns, on_update, on_delete from (select * from pragma_foreign_key_list('users', 'main') order by id desc, seq) group by id, "table", on_update, on_deletepragma foreign_keyspragma foreign_keysalter table "users" add column "branch_id" integerpragma foreign_keys = 0create table "__temp__users" ("id" integer primary key autoincrement not null, "name" varchar not null, "email" varchar not null, "email_verified_at" datetime, "password" varchar not null, "remember_token" varchar, "created_at" datetime, "updated_at" datetime, "branch_id" integer, foreign key("branch_id") references "branches"("id") on delete set null)insert into "__temp__users" ("id", "name", "email", "email_verified_at", "password", "remember_token", "created_at", "updated_at", "branch_id") select "id", "name", "email", "email_verified_at", "password", "remember_token", "created_at", "updated_at", "branch_id" from "users"drop table "users"alter table "__temp__users" rename to "users"create unique index "users_email_unique" on "users" ("email")pragma foreign_keys = 1alter table "users" add column "role_id" integerpragma foreign_keys = 0create table "__temp__users" ("id" integer primary key autoincrement not null, "name" varchar not null, "email" varchar not null, "email_verified_at" datetime, "password" varchar not null, "remember_token" varchar, "created_at" datetime, "updated_at" datetime, "branch_id" integer, "role_id" integer, foreign key("branch_id") references "branches"("id") on delete set null, foreign key("role_id") references "roles"("id") on delete set null)insert into "__temp__users" ("id", "name", "email", "email_verified_at", "password", "remember_token", "created_at", "updated_at", "branch_id", "role_id") select "id", "name", "email", "email_verified_at", "password", "remember_token", "created_at", "updated_at", "branch_id", "role_id" from "users"drop table "users"alter table "__temp__users" rename to "users"create unique index "users_email_unique" on "users" ("email")pragma foreign_keys = 1alter table "users" add column "locale" varchar not null default 'en'alter table "users" add column "timezone" varchar not null default 'Africa/Cairo'alter table "users" add column "is_active" tinyint(1) not null default '1'alter table "users" add column "last_login_at" datetimecreate table "teams" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "name" varchar not null, "manager_id" integer, "created_at" datetime, "updated_at" datetime, foreign key("branch_id") references "branches"("id") on delete cascade, foreign key("manager_id") references "users"("id") on delete set null)create table "team_user" ("team_id" integer not null, "user_id" integer not null, foreign key("team_id") references "teams"("id") on delete cascade, foreign key("user_id") references "users"("id") on delete cascade, primary key ("team_id", "user_id"))insert into "migrations" ("migration", "batch") values ('2026_07_12_000100_create_crm_foundation_tables', 1)create table "leads" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "owner_id" integer, "reference" varchar not null, "name" varchar not null, "company" varchar, "email" varchar, "phone" varchar, "status" varchar not null default 'new', "source" varchar, "score" integer not null default '0', "estimated_value" numeric not null default '0', "currency" varchar not null default 'EGP', "notes" text, "next_follow_up_at" datetime, "created_by" integer, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, foreign key("branch_id") references "branches"("id"), foreign key("owner_id") references "users"("id") on delete set null, foreign key("created_by") references "users"("id") on delete set null)create index "leads_branch_id_status_index" on "leads" ("branch_id", "status")create unique index "leads_reference_unique" on "leads" ("reference")create index "leads_email_index" on "leads" ("email")create index "leads_phone_index" on "leads" ("phone")create index "leads_status_index" on "leads" ("status")create index "leads_next_follow_up_at_index" on "leads" ("next_follow_up_at")insert into "migrations" ("migration", "batch") values ('2026_07_12_000200_create_leads_table', 1)create table "companies" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "name" varchar not null, "industry" varchar, "email" varchar, "phone" varchar, "status" varchar not null default 'active', "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, foreign key("branch_id") references "branches"("id"))create table "contacts" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "company_id" integer, "name" varchar not null, "email" varchar, "phone" varchar, "job_title" varchar, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, foreign key("branch_id") references "branches"("id"), foreign key("company_id") references "companies"("id") on delete set null)create table "opportunities" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "reference" varchar not null, "name" varchar not null, "value" numeric not null default '0', "currency" varchar not null default 'EGP', "stage" varchar not null default 'qualification', "expected_close_date" date, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, foreign key("branch_id") references "branches"("id"))create unique index "opportunities_reference_unique" on "opportunities" ("reference")create table "activities" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "assigned_to" integer, "subject" varchar not null, "type" varchar not null default 'task', "status" varchar not null default 'pending', "due_at" datetime, "created_at" datetime, "updated_at" datetime, foreign key("branch_id") references "branches"("id"), foreign key("assigned_to") references "users"("id") on delete set null)create table "tickets" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "reference" varchar not null, "subject" varchar not null, "priority" varchar not null default 'normal', "status" varchar not null default 'open', "due_at" datetime, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, foreign key("branch_id") references "branches"("id"))create unique index "tickets_reference_unique" on "tickets" ("reference")insert into "migrations" ("migration", "batch") values ('2026_07_12_000300_create_navigation_module_tables', 1)select name, type, not "notnull" as "nullable", dflt_value as "default", pk as "primary", hidden as "extra" from pragma_table_xinfo('companies', 'main') order by cid ascselect "sql" from "main".sqlite_master where type = 'table' and name = 'companies'select 'primary' as name, group_concat(col) as columns, 1 as "unique", 1 as "primary" from (select name as col from pragma_table_xinfo('companies', 'main') where pk > 0 order by pk, cid) group by name union select name, group_concat(col) as columns, "unique", origin = 'pk' as "primary" from (select il.*, ii.name as col from pragma_index_list('companies', 'main') il, pragma_index_info(il.name, 'main') ii order by il.seq, ii.seqno) group by name, "unique", "primary"select group_concat("from") as columns, 'main' as foreign_schema, "table" as foreign_table, group_concat("to") as foreign_columns, on_update, on_delete from (select * from pragma_foreign_key_list('companies', 'main') order by id desc, seq) group by id, "table", on_update, on_deletepragma foreign_keyspragma foreign_keysalter table "companies" add column "owner_id" integerpragma foreign_keys = 0create table "__temp__companies" ("id" integer primary key autoincrement not null, "branch_id" integer not null, "name" varchar not null, "industry" varchar, "email" varchar, "phone" varchar, "status" varchar not null default ('active'), "created_at" datetime, "updated_at" datetime, "deleted_at" datetime, "owner_id" integer, foreign key("branch_id") references branches("id") on delete no action on update no action, foreign key("owner_id") references "users"("id") on delete set null)insert into "__temp__companies" ("id", "branch_id", "name", "industry", "email", "phone", "status", "created_at", "updated_at", "deleted_at", "owner_id") select "id", "branch_id", "name", "industry", "email", "phone", "status", "created_at", "updated_at", "deleted_at", "owner_id" from "companies"drop table "companies"alter table "__temp__companies" rename to "companies"pragma foreign_keys = 1alter table "companies" add column "reference" varcharalter table "companies" add column "website" varcharalter table "companies" add column "tax_number" varcharalter table "companies" add column "city" varcharalter table "companies" add column "country_code" varchar not null default 'EG'alter table "companies" add column "address" textalter table "companies" add column "notes" textalter table "companies" add column "created_by" integer