17 ms·
> Rails doesn't have any separate facility for migration account vs production account. Writing your migrations in anything but SQL is one problem. (OK, perha
by tuatoru 6y ago
> Rails doesn't have any separate facility for migration account vs production account.
Writing your migrations in anything but SQL is one problem. (OK, perhaps pl/pgsql too.) Running it with a system user and database role that has access to the web app code is another.
But the major one is that web apps should use very limited database roles that only have execute permission for specific stored procedures. In any environment.
Anything else will lead to security exposures, as we continually see.
Yes, it takes longer and requires you to become proficient in SQL. So what? You might learn to make better use of your RDBMS. If you're working with data, you need to know SQL. And you especially need to know the access control features of your RDBMS.
From the perspective of data security, the answer to "when should you not use Rails?" is always.