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] falcrum.livejournal.com 2013-07-30 07:25 pm (UTC)(link)
Архип'авильно! Были прен-цен-ден-ты... :(

[identity profile] sergiej.livejournal.com 2013-07-30 07:31 pm (UTC)(link)
ну так блин, лучший учитель - собственная задница :)