bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
bambanxx has quit [Client Quit]
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 276 seconds]
jenrzzz_ has joined #ruby
<cnsvc>
ruby upgrade is nothing comparing to rails upgrade
<cnsvc>
i read Shopify announced the upgrade to Ruby 3.3.0 in less than 24 hours after the official release
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
<noahmg123>
Fascinating
donofrio has quit [Remote host closed the connection]
<noahmg123>
Also figured out from leadership that some intern made some db changes outside Rails so now our migrations files are just f-ed unless we run them against our already-existing dev server.
<weaksauce>
noahmg123 generally migrations should be temporary
<weaksauce>
and not the source of truth for your db
barak has quit [Read error: Connection reset by peer]
donofrio has joined #ruby
<noahmg123>
weaksauce: that's fair. Maybe we actually don't need all these migration files that are committed in our repo
<weaksauce>
their purpose is to move the db from one state to the next and to reflect that in production
<weaksauce>
and get everyone in dev to the next db state
<noahmg123>
Yeah makes sense. I'm honestly not sure why we're keeping them around.
<weaksauce>
you can always put them into a folder
donofrio has quit [Max SendQ exceeded]
<noahmg123>
Yeah, we do
<noahmg123>
It's just that our internal documentation says to run `db:migrate`
<weaksauce>
now the "made changes to the db" part is problematic
<weaksauce>
because the migrations mold the schema
<noahmg123>
Yeah
<noahmg123>
Ok so maybe I'm a tad mistaken here
jenrzzz has quit [Ping timeout: 264 seconds]
<noahmg123>
If I run `db:schema:load`, it works well except for some small things.
<weaksauce>
i'm guessing there isn't a robust test suite?
<weaksauce>
is there a seed file?
<weaksauce>
you might need seeds if they use that for immutable things
<mange>
We had an issue like that in our system, but we just dumped the live schema to schema.rb and noted "you need to create the database with db:schema:load or db:reset", and moved on.
<noahmg123>
If I then run `db:migrate` it starts reading from the earliest migration file and complains that the thanks already exists.
<noahmg123>
table*
<weaksauce>
well yeah
<weaksauce>
it's more of a one or the other thing
<noahmg123>
Yeah
donofrio has joined #ruby
<noahmg123>
Well we have a lot of old migration files. But some were deleted and some expect tables to exist that were created outside this process
<weaksauce>
the problem you run into is when the migrations do non-trival db operations
<cnsvc>
i guess that's a 5-years-old migration folder
<weaksauce>
yeah
<noahmg123>
cnsvc: only a few years old tbh
<noahmg123>
It's just not in sync with `schema.rb` because some intern fucked up a year or so ago
<noahmg123>
And now we just point `database.yml` to a known working dev server and tell people not to run against a local server.
<weaksauce>
lol wat
<weaksauce>
dysfunctional af
<mange>
That's wild.
<noahmg123>
Yep
<cnsvc>
i'll fix it whenever see this to avoid tech debt
<weaksauce>
no wonder it's poorly documented
<weaksauce>
how are they doing migrations in development?
<weaksauce>
it's just yolo
<noahmg123>
Not sure
<noahmg123>
Although, how does db:migrate work? Does it run every migration file it sees? Or does it know which ones you already ran?
jenrzzz_ has quit [Ping timeout: 276 seconds]
<weaksauce>
there's a field in the db that says "this is the last migration run"
<noahmg123>
I see
<weaksauce>
and it's a timestamp that corresponds to the filename
<noahmg123>
So that's probably why the dev server is working
<weaksauce>
so wild
<weaksauce>
it's trivial to do local dbs
<noahmg123>
Yes
<noahmg123>
Except when an intern wants to make non-trivial db changes outside the migration files
<weaksauce>
yeah they shouldn't allow that
<noahmg123>
They didn't
<noahmg123>
It got done anyway
<noahmg123>
At least that's the story I hear
<weaksauce>
i'd dump the dev db and use it locally and run migrations that get checked into git
<weaksauce>
or periodically dump the dev db
<weaksauce>
dump == backup and restore locally
<noahmg123>
Would be interesting. Still fucky though.
<cnsvc>
Nobody cares the setup until new engineer comes and oops :(
<noahmg123>
cnsvc: tell me about it
<noahmg123>
I literally spent half my day today documenting the setup procedure for all the tooling
<noahmg123>
For a project I just got added on this week
<noahmg123>
And this is my first Ruby project
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
<cnsvc>
migrations are against the recent changes of files. sometimes dev/prod don't see the issues until a new setup involves and run it from the beginning.
<weaksauce>
noahmg123 that's actually warp speed at most places
<weaksauce>
you're faster than most
grenierm has joined #ruby
<noahmg123>
weaksauce: yeah, that's honestly the issue I've found in my career. I want to clean up tech debt but most people want to just trudge along.
<noahmg123>
well that's one thing
<noahmg123>
the other is my work speed
<cnsvc>
a common issue i have seen is that people like to write rails code in migration file. they directly call `User.create!(...` and then after a few months User is becoming Moderator
<weaksauce>
yeah
<cnsvc>
the testing env can't see the problems because it loads from schema
<weaksauce>
should not be done in a migration but more a "bootstrap" or the like file
<noahmg123>
I've often found myself waiting on coworkers for code approvals and stuff. Granted, some of those people are far more busy than me. But more often than not I've found that I'm apparently the one with the most free time.
<weaksauce>
seeds maybe
infinityfye has quit [Read error: Connection reset by peer]
m_antis has quit [Ping timeout: 245 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 245 seconds]
ua_ has quit [Ping timeout: 252 seconds]
trillion_exabyte has quit [Ping timeout: 245 seconds]
ua_ has joined #ruby
trillion_exabyte has joined #ruby
jenrzzz_ has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 260 seconds]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
pounce has quit [Ping timeout: 256 seconds]
reset has quit [Quit: reset]
jenrzzz_ has joined #ruby
meimei has quit [Ping timeout: 256 seconds]
meimei has joined #ruby
pounce has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
donofrio has quit [Max SendQ exceeded]
jenrzzz_ has joined #ruby
pounce has quit [Ping timeout: 264 seconds]
donofrio has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
pounce has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
jenrzzz_ has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
Al2O31 has joined #ruby
Al2O31 has quit [Client Quit]
jenrzzz_ has quit [Ping timeout: 252 seconds]
pounce has quit [Ping timeout: 240 seconds]
jenrzzz_ has joined #ruby
<[0x1eef_]>
noahmg123: You could dump the schema from the server with the "good" database. Then delete all the current migrations, and start over from there.
<noahmg123>
[0x1eef_]: part of what I was wanting to do was to get something good for people to onboard with if we got new devs. That might actually work but I would need to ok it with management and everything. I think we've been leaning way too much on `db:migrate`.
<Al2O3>
ruby doobie doo
Paris has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
<[0x1eef_]>
I agree with weaksauce. Migrations are hard to keep running over time. They usually apply a schema change. 'rake db:seeds' is a better place to bootstrap. Starting over sounds like it would help.
<rapha>
adam12: Thanks for the link, that will come in handy at some point. I was indeed looking for something that can make use of modern terminals and also doesn't monkey patch things / mess with Core extensions.
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 260 seconds]
rvalue has quit [Ping timeout: 256 seconds]
Paris has joined #ruby
jas-maelstrom has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
constxqt_ has joined #ruby
rvalue has joined #ruby
desnudopenguino has joined #ruby
constxqt_ has quit [Ping timeout: 260 seconds]
Paris has quit [Remote host closed the connection]
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 240 seconds]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
constxqt_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
Guest3710 has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
<[0x1eef_]>
Paint is a nice gem. It doesn't have any runtime dependencies AFAIK.
constxqt_ has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
constxqt_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
jenrzzz has joined #ruby
constxqt_ has quit [Ping timeout: 245 seconds]
polishdub has joined #ruby
user23 has quit [Remote host closed the connection]
Guest3710 is now known as wackoos
Req has joined #ruby
Req__ has joined #ruby
Req__ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 276 seconds]
Req has quit [Client Quit]
Req has joined #ruby
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
constxqt_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
wackoos has quit [Quit: Leaving...]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
bambanxx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Paris has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 252 seconds]
bambanxx has joined #ruby
Starfoxxes has quit [Ping timeout: 256 seconds]
bambanxx has quit [Client Quit]
bambanxx has joined #ruby
jenrzzz has joined #ruby
ollysmith has quit [Ping timeout: 256 seconds]
Starfoxxes has joined #ruby
ollysmith has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ollysmith has quit [Ping timeout: 264 seconds]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ollysmith has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
donofrio has quit [Remote host closed the connection]
jenrzzz_ has quit [Ping timeout: 252 seconds]
donofrio has joined #ruby
schne1der has quit [Ping timeout: 246 seconds]
donofrio has quit [Max SendQ exceeded]
_ht has quit [Quit: _ht]
mrrobinhood5 has joined #ruby
Paris has quit [Quit: quit]
donofrio has joined #ruby
jenrzzz_ has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
ollysmith has quit [Ping timeout: 264 seconds]
ollysmith has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
ollysmith has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
bambanxx has joined #ruby
jenrzzz has joined #ruby
ih8u1 has joined #ruby
ih8u has quit [Remote host closed the connection]
ih8u1 is now known as ih8u
matoro has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Paris has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
thodg has quit [Read error: Connection reset by peer]
thodg has joined #ruby
desnudopenguino has quit [Ping timeout: 260 seconds]