refactor(migrations): consolidar add_* en sus create_* (49 → 28)
Pliega las migraciones de "añadir/modificar columna" dentro de la migración create de cada tabla, con esquema final idéntico (verificado por diff normalizado de columnas + índices y suite completa): - users (locale, notes), projects (reference/external_reference_1/country), companies (apodo/estado/logo_path), layers (color; sin geojson_data), phases (fechas), features (status/responsible_user_id + sync + softDeletes), inspection_templates (phase_id), inspections (workflow + sync + softDeletes), issues (type + sync), progress_updates/media (sync), issue_tasks (overdue), permissions (group/description) y roles (description); soft-deletes en sus creates. - Se mantienen las que dependen de orden/FK: add_profile_fields (users.company_id → companies) y update_inspections_feature_id_foreign (feature_id → features). - Eliminado database/schema/mysql-schema.sql (obsoleto): las instalaciones nuevas ejecutan las migraciones; las BD existentes no se tocan. Regenerable con schema:dump. Suite 75 passing. Esquema SQLite idéntico antes/después. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,8 @@ return new class extends Migration
|
||||
// $table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // permission id
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('group')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
|
||||
@@ -38,6 +40,7 @@ return new class extends Migration
|
||||
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||
}
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('description')->nullable();
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
if ($teams || config('permission.testing')) {
|
||||
|
||||
Reference in New Issue
Block a user