~/talk

How to avoid database migration hell

Talkat Laracon EU 2016 · 2016-08-23..08-24· [databases]
links:none on file
slides:none on file

Argues migrations manage schema only and seeds manage data, with concrete commands like artisan make:migration and using Faker + factories for realistic test/demo rows; compares truncate vs append seeding strategies, shows disabling foreign keys for truncation and using in‑memory SQLite for fast tests; describes packaging the database dir as a composer package so web app runs migrations in production while the API uses it as a dev dependency; reports hundreds of messy migrations forced a rewrite and the composer approach works.

AI-written summary · about

  1. 0:00Intro
  2. 1:19WHAT IS A DATABASE MIGRATION?
  3. 1:38WHY USE DATABASE MIGRATIONS?
  4. 6:14HOW DO I MAKE A MIGRATION?
  5. 7:59WHAT DOES A MIGRATION LOOK LIKE?
  6. 10:14WHAT IS A DATABASE SEED?
  7. 10:37WHY USE DATABASE SEEDS?
  8. 16:03WHAT DOES A SEED LOOK LIKE?
  9. 17:46MODEL FACTORIES IN LARAVEL
  10. 19:18CATEGORISING YOUR SEEDS
  11. 21:10DATABASE SEED STRATEGIES
  12. 24:27WAIT, WHY NOT USE MIGRATIONS?
  13. 25:57TRUNCATION STRATEGY SEEDS
  14. 28:27APPEND STRATEGY SEEDS
  15. 30:20CODE DEFENSIVELY
  16. 36:27COMPOSER TO THE RESCUE
  17. 36:50DATABASE PACKAGES
  18. 37:30STRUCTURING YOUR COMPOSER PACKAGE
  19. 38:52SETTING UP THE COMPOSER PACKAGE
  20. 40:04LARAVEL. CONFIGURATION
  21. 40:50INSTALLING THE COMPOSER PACKAGE
  22. 42:05SUMMARY
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.