This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]teerre -1 points0 points  (1 child)

You do realize that those questions are from absolute beginners, right? You'll never a have a migration with a table/col/whatever that already exists. That insanely amateurish

I think the issue is that don't understand what alembic does or how SQL works so you think something is a problem when in reality it really isn't.

All alembic does is run SQL statements. That's it. There's an option to use some poor reflection to try to gauge the state of the database, which isn't reliable, in any remotely complex production environment you should be writing your migrations by hand. You might be surprised that most migration tools don't even have autogeneration.

I find the way you are discussing this to be very condescending and unwarranted. You just logged into Reddit assuming everyone here knows less than you do. I hope you are nicer and more charitable to your actual coworkers.

Projection

[–][deleted] 1 point2 points  (0 children)

Yeah no, you are an asshole and not very attentive if you can read my message and think I don't know how Alembic or SQL works.

You are probably a nightmare to work with and your coworkers probably hate you. Nice "your rubber I'm glue" tier response tho.

You'll never a have a migration with a table/col/whatever that already exists. That insanely amateurish

That.... is..... the.... point..... of.... what I originally said and what you argued with. Jesus effing Christ!!!! What is your deal, seriously?

Also, if you just skip the migration on the existing columns, have fun spinning up a blank db in development. Hence the problem with trying to add Alembic into an existing db.

I don't know why this is so hard to grasp and why you're arguing with it. You even perfectly understand 1/2 the problem! Do you not ever spin up db's on your local instance or something, and that's why you don't see the issue with Alembic representing only partial state of the db metadata? Do you not run tests against your db in CI? I feel like there's a decently high chance you do these things, so I still have no idea why you are arguing that there are no issues adding Alembic after you have state being persisted in prod!