4 ms·
Because then it's not in version control.
by astine 12y ago
Because then it's not in version control.
- brlewis 12y agoStored procedures can and should be deployed from files that are under version control.
- astine 12y agoThen you have to keep your database and those files in sync. There are tools that help with this, but it's no longer as simple as redeploying your code.
- knodi123 12y agoit's certainly that simple in my deploy script.
- thirsteh 12y agoNot really. The program can define the stored procedures on startup.
- NickNameNick 12y agoThat tends to hurt a lot when you have multiple front ends, and in general, I don't like the front end to have that much access to the database.
- spacemanmatt 12y agoOrganizations I've been with have always preferred to keep the revenue app out of the schema-maintenance business.
- brlewis 12y agoYou keep them in sync by only deploying from those files, exactly the same best practice for deploying any software.
- NoMoreNicksLeft 12y agoA couple of weeks ago I asked the Sequelize people why they couldn't also copy their validators into the database. The validation would still happen on the node app side of things, but when it generates the create table query (as it must) it could easily also put in the equivalent check constraint. Waiting on an official answer.
- spacemanmatt 12y agoIs that for the same reason that stored procedures, column constraints, indexes, and performance are not tested the same way any other code is? When I write a schema, I plan for testing it with dummy data. If it's PostgreSQL I write a test using PGTap. It's code. You test it. I don't get why everyone doesn't get that.