CUB-29: Create filament inventory database migration #3

Closed
overseer wants to merge 0 commits from agent/hex/CUB-29-filament-migration into dev
Owner

Summary

Create and apply the initial EF Core database migration for the Extrudex filament inventory system.

Changes

  • Migration files: Added 20260426131419_InitialCreate migration with all entity tables
  • Tables created: material_bases, material_finishes, material_modifiers, spools, printers, print_jobs, ams_units, ams_slots
  • Seed data: 6 material bases, 15 material finishes, 11 material modifiers
  • Index naming fix: Added explicit HasDatabaseName for spool FK indexes (material_finish_id, material_modifier_id) to enforce snake_case ix_ convention
  • BaseEntityConfiguration: Added automatic pluralization in ToSnakeCase for table name generation

Schema Standards Enforced

  • All tables use snake_case naming
  • All indexes use ix_ prefix with snake_case
  • All foreign keys use fk_ prefix with snake_case
  • UUID primary keys on all tables
  • created_at/updated_at timestamps with UTC defaults
  • Proper ON DELETE behaviors (Restrict for required FKs, SetNull for optional)

Verification

  • Migration applied successfully to PostgreSQL database
  • All 8 domain tables verified present
  • All 19 non-PK indexes verified with correct snake_case names
  • Seed data verified: 6 bases, 15 finishes, 11 modifiers
  • Build passes with 0 warnings, 0 errors

Closes CUB-29

## Summary Create and apply the initial EF Core database migration for the Extrudex filament inventory system. ## Changes - **Migration files**: Added `20260426131419_InitialCreate` migration with all entity tables - **Tables created**: material_bases, material_finishes, material_modifiers, spools, printers, print_jobs, ams_units, ams_slots - **Seed data**: 6 material bases, 15 material finishes, 11 material modifiers - **Index naming fix**: Added explicit `HasDatabaseName` for spool FK indexes (material_finish_id, material_modifier_id) to enforce snake_case `ix_` convention - **BaseEntityConfiguration**: Added automatic pluralization in `ToSnakeCase` for table name generation ## Schema Standards Enforced - All tables use snake_case naming - All indexes use `ix_` prefix with snake_case - All foreign keys use `fk_` prefix with snake_case - UUID primary keys on all tables - created_at/updated_at timestamps with UTC defaults - Proper ON DELETE behaviors (Restrict for required FKs, SetNull for optional) ## Verification - Migration applied successfully to PostgreSQL database - All 8 domain tables verified present - All 19 non-PK indexes verified with correct snake_case names - Seed data verified: 6 bases, 15 finishes, 11 modifiers - Build passes with 0 warnings, 0 errors Closes CUB-29
overseer added 1 commit 2026-04-26 09:16:40 -04:00
overseer closed this pull request 2026-04-26 11:19:08 -04:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CubeCraft-Creations/Extrudex#3