662be183db
- migration 2026_05_27_120000: CREATE TABLE project_routing_snapshots PARTITION BY RANGE (snapshot_date) composite PK (snapshot_date, project_id), FK tenant_id->tenants ON DELETE CASCADE RLS policy tenant_isolation, indexes tenant_date + signal GRANT crm_app_user (SELECT/INSERT/UPDATE), crm_supplier_worker (+DELETE) initial partitions y2026_m05 + y2026_m06 system_settings retention 3m - MonthlyPartitionManager::PARTITIONED_TABLES +'project_routing_snapshots' => 'snapshot_date' - db/schema.sql -> v8.39 - tests: ProjectRoutingSnapshotsTableTest (3) + Unit/MonthlyPartitionManagerTest (1) GREEN Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
16 lines
583 B
PHP
16 lines
583 B
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
use App\Services\MonthlyPartitionManager;
|
||
|
||
// Unit test: verifies PARTITIONED_TABLES constant only — no DB.
|
||
// Added for TDD: project_routing_snapshots (snapshot_date key, Этап 2, 27.05.2026).
|
||
|
||
test('PARTITIONED_TABLES содержит project_routing_snapshots с ключом snapshot_date', function (): void {
|
||
expect(MonthlyPartitionManager::PARTITIONED_TABLES)
|
||
->toHaveKey('project_routing_snapshots')
|
||
->and(MonthlyPartitionManager::PARTITIONED_TABLES['project_routing_snapshots'])
|
||
->toBe('snapshot_date');
|
||
});
|