News for hackers. Stuff that matters.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tehlike on Saturday May 23, 2020 @05:26PM (#23286625)
I got my pm friend prototype his idea on mean stack, but when we got more serious, immediately transitioned to postgres and started using sequelize as the orm. Pretty good decision so far. I don't think they will have cases that won't scale with orm for foreseeable future.
Re:Jepsen Disputes MongoDB's Data Consistency Claims by PacifyFish on Saturday May 23, 2020 @07:21PM (#23287532)
How do you manage dev vs prod instances with sequelize? Specifically, do you use migrations for your local dB or just force sync it?
Re:Jepsen Disputes MongoDB's Data Consistency Claims by tehlike on Saturday May 23, 2020 @07:55PM (#23287748)
they use sequelize migrations for now, eventually we may want to go to something more advanced. take a backup, apply migrations has worked so far. force sync extremely harmful, sequelize is terrible for not being able to incrementally do schema changes. I don't think it can actually add a column, for example.

For us, as a result, it means anytime we add a new model or change a table, we write the table definition in more verbose api, and sometimes resort to sql commands for adding things like defaults in the migrations. (sequelize for some reason can not specify uuid default value for postgres, for example, so we set a default ourselves, even though we don't need one as we have time dependent uuid generator on the client to help with indices).

We kind of learned working around sequelize shortcomings :)

I am still looking for a tool that'd make incremental backups on postgres easier than it is, but for now things are ok.

Re:Jepsen Disputes MongoDB's Data Consistency Claims by AmericanChopper on Saturday May 23, 2020 @11:53PM (#23288939)
Sequelize documentation is pretty bad for some of this stuff, but it has the functionality you listed. You can give Postgres a default uuid by setting the column options to ‘new Sequelize.UUIDV4()’, and queryInterface supports add, remove and change column.

The biggest annoyance I had with migrations was anything that needed a model to be defined inside the migration. I eventually gave up on that and just wrote my own scripts to work around it. But perhaps I just wasn’t persistent enough...

Re:Jepsen Disputes MongoDB's Data Consistency Claims by tehlike on Sunday May 24, 2020 @12:10AM (#23289009)
I am not super sure, but i remember trying this, and it did not work insides migrations :(
Re:Jepsen Disputes MongoDB's Data Consistency Claims by AmericanChopper on Sunday May 24, 2020 @12:17AM (#23289034)
You might be right. It's quite a while since I was working on that project, and now I'm starting to doubt how sure I am about this...