| 1234567891011121314151617 |
- <?php
- /** Add headcount for platform replenishment estimates; never infer existing company sizes. */
- require dirname(__DIR__).'/vendor/autoload.php';
- \Dotenv\Dotenv::createUnsafeMutable(dirname(__DIR__))->load();
- \support\App::loadAllConfig(['route']);
- use plugin\saiadmin\app\model\water\WaterEnterprise;
- $schema=(new WaterEnterprise())->getConnection()->getSchemaBuilder();
- if (!in_array('--apply',$argv,true)) {
- echo "Plan: add nullable employee_count; existing enterprise headcounts remain unknown.\n";
- exit;
- }
- if (!$schema->hasColumn('sa_water_enterprise','employee_count')) {
- $schema->table('sa_water_enterprise',function (\Illuminate\Database\Schema\Blueprint $table) {
- $table->unsignedInteger('employee_count')->nullable()->comment('公司人数,NULL为未登记');
- });
- }
- echo "Applied: enterprise employee_count available; stock, entitlements and deliveries preserved.\n";
|