Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@PoweredByCoffee depends, on small scale they don't matter on bigger scales it seriously speeds up
-
stisch46038yAha! I set foreign keys in development and there's nothing you can do to stop me!
(I do end up screwing myself into large migrations though... curse my OCD) -
By creating the column "foo_id" and writing a separat migration to set fks in production.
-
@ironedr i don't know about Common practice, it's just my lazy approach. Try to truncate or delete a table with fks and mysql throws you an error message if data is present . Since it's my dev env there sometimes is the need to wipe everything or wipe a certain table
Related Rants
I never set foreign keys in development in case I need to wipe or truncate stuff. Fuck you sql
undefined
indexes
database
sql
mysql