Skip to content

Squash migrations after ULID adoption is complete #123

@ManukMinasyan

Description

@ManukMinasyan

Overview

Once the ULID migration has been applied to all environments, consolidate incremental migrations into the original create_* files and delete redundant ones. This keeps the migration directory clean and makes migrate:fresh reflect the true schema without running unnecessary alter/drop steps.

Tasks

  • Update create_users_table.php to use $table->ulid('id')->primary() and remove sessions FK
  • Update create_teams_table.php to include slug column
  • Update create_imports_table.php to reflect final schema (with entity_type, status, headers, column_mappings, etc.)
  • Update all other create_* migrations to use ULID primary keys and ULID foreign keys
  • Delete 2025_12_20_000000_migrate_to_ulid.php
  • Delete 2026_02_11_232804_add_slug_to_teams_table.php
  • Delete 2026_02_12_222910_expand_imports_table.php
  • Delete 2026_02_13_002721_cleanup_imports_table.php
  • Delete 2026_02_15_214730_drop_sessions_user_id_foreign_key.php
  • Run php artisan migrate:fresh --seed to verify squashed migrations
  • Run full test suite to confirm nothing breaks

Success Criteria

  • Migration directory contains only create_* and essential update_* migrations
  • migrate:fresh produces identical schema to the current incremental chain
  • All tests pass
  • No environment depends on the deleted incremental migrations

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dataDatabase, migrations, and data management

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions