metaclass: (Default)
metaclass ([personal profile] metaclass) wrote2013-07-30 08:07 pm

Рельсы и констрейнты в БД

http://guides.rubyonrails.org/migrations.html#active-record-and-referential-integrity
"The Active Record way claims that intelligence belongs in your models, not in the database. As such, features such as triggers or foreign key constraints, which push some of that intelligence back into the database, are not heavily used."

В ActiveRecord червь не рекомендует делать констрейнты в БД. Это огорчение, т.к. например, я сломал к хуям (т.е. до невозможности вообще хоть что-либо сделать из UI) хипстерское веб-приложение одним SQL-запросом :)

[identity profile] ext_1684112 (from livejournal.com) 2013-07-31 12:22 pm (UTC)(link)
>Новомодный стиль

Что это он новомодный. Очень даже старый.

[identity profile] zelanton.livejournal.com 2013-07-31 12:50 pm (UTC)(link)
хуяк-хуяк, в продакшен и забыть)