text stringlengths 0 2.35k |
|---|
[3414.38 --> 3414.98] but like it also |
[3414.98 --> 3415.64] breaks a decent |
[3415.64 --> 3416.90] amount and it's |
[3416.90 --> 3417.30] an important |
[3417.30 --> 3418.16] functionality for the |
[3418.16 --> 3418.70] app, so please |
[3418.70 --> 3419.22] check that out. |
[3419.60 --> 3420.06] So those two |
[3420.06 --> 3420.82] things really helped |
[3420.82 --> 3421.26] prioritize. |
[3421.72 --> 3422.56] That scary |
[3422.56 --> 3423.44] intuition reminds |
[3423.44 --> 3424.14] me of severance, |
[3424.28 --> 3424.62] honestly. |
[3424.84 --> 3425.82] It's like, well, I |
[3425.82 --> 3426.70] can easily spot the |
[3426.70 --> 3427.62] scary numbers here. |
[3429.56 --> 3430.54] Continue listening |
[3430.54 --> 3432.32] at changelog.fm |
[3432.32 --> 3433.64] slash 494. |
[3433.80 --> 3434.62] That's episode |
[3434.62 --> 3436.26] number 494. |
[3436.60 --> 3437.26] Thanks again to |
[3437.26 --> 3437.82] our partners at |
[3437.82 --> 3438.62] Fastly for having |
[3438.62 --> 3439.68] our CDN covered, |
[3439.96 --> 3440.82] to the mysterious |
[3440.82 --> 3442.00] Breakmaster Cylinder for |
[3442.00 --> 3442.76] keeping our beat |
[3442.76 --> 3444.36] supply on swole, and |
[3444.36 --> 3445.12] to you for listening. |
[3445.32 --> 3446.12] We appreciate you. |
[3446.34 --> 3447.50] That is all for now. |
[3447.70 --> 3448.34] We'll talk to you |
[3448.34 --> 3449.80] again next time on |
[3449.80 --> 3450.34] GoTime. |
[3450.34 --> 3454.26] GoTime. |
[3454.72 --> 3455.18] Goigi. |
[3455.18 --> 3456.18] GoTime. |
[3461.32 --> 3462.72] GoTime. |
[3462.72 --> 3465.10] Game on! |
• What are migrations |
• Why schema migrations are necessary |
• Tooling for managing migrations (e.g. Golang Migrate, Dbmate, Pressly Goose) |
• How these tools work behind the scenes (e.g. using metadata or schema history tables to track applied migrations) |
• Issues with manually changing or undoing migrations |
• Handling out-of-order migrations |
• Pros and cons of using timestamp-based versus sequential versioning for database migrations |
• Risks of out-of-order migrations and potential issues with tooling and troubleshooting |
• Benefits of sequential numbering, including easier rollback and reduced risk of errors |
• Approaches to handling migration failures, including running entire migrations in transactions or using locking mechanisms |
• Types of migrations that cannot be truthfully undone, such as deleting tables or columns, data manipulation changes, and certain types of alters. |
• Decoupling migration steps from application code |
• Benefits of having a separate process for migrations, including zero downtime deployment |
• Common mistakes in setting up migrations, such as running migrations within the same binary and not ensuring forwards and backwards compatibility |
• Importance of tooling in managing migrations, including Goose and Golang Migrate |
• Building custom migration tools, with Mike Fridman suggesting it's a good learning experience to create one on your own |
• Approaches to deploying migrations to production, including ad-hoc, semi-manual, and continuous deployment environments |
• Challenges of running multiple instances of an application and the need for tooling that can handle concurrent migrations. |
• Pitfalls of automated migration mechanism |
• Using singleton process for migration deployment |
• GitHub Actions for CI/CD pipeline and migration deployment |
• Testing migrations in continuous environment |
• Techniques for testing up and down migrations |
• Decoupling production database from development environment |
• Checking final schema against desired schema |
• Comparing schema between staging/production and Git repository |
• Importance of maintaining a consistent database schema across all environments |
• Need for developers to carefully consider their changes before implementing them |
• Benefits of having backups and disaster recovery documentation in place |
• Danger of premature use of new features, such as Go generics |
• Criticism of the Go logger struct design |
• Discussion on the need for a logging interface in Go and potential implications of its adoption |
• Debate about whether an interface is necessary or if third-party libraries would adapt to work with standard HTTP handlers |
• Introduction of the "any" alias in Go 1.18, which maps to the empty interface, and concerns about potential confusion and fragmentation in codebases |
**Jon Calhoun:** Hello everyone, and welcome to Go Time. Today I am joined by Mike Fridman. Hey, Mike. How are you? |
**Mike Fridman:** Hello! |
**Jon Calhoun:** I am also joined by Vojtech Vitek... |
**Vojtech Vitek:** Hello there! |
**Jon Calhoun:** Vojtech, how are you? |
**Vojtech Vitek:** I'm good. |
**Jon Calhoun:** And today we're gonna be talking about schema migrations. So we're gonna be talking about tools that you can use to manage these, different processes around them, some mistakes you can make, and maybe some tips on how to avoid them hopefully... So we're gonna be diving into all of that. |
Let's just start off by talking about what are migrations. Do any of you wanna take that one? |
**Mike Fridman:** Yeah, sure. I can take a crack at it. So at a very high level, migrations - or the type of migrations that we're gonna talk about - are schema migrations. So that's taking some SQL, and then evolving your database over time. |
**Jon Calhoun:** So for anybody who started -- I guess it depends on when you started. But for somebody who started in the day where you would just pop into PHP MyAdmin and just type in some SQL and change your database - why do we need something to track migrations? Why is that an important thing? Vojtech, do you wann... |
**Vojtech Vitek:** Sure. I think about database migration as a Git for your SQL schema. You need to make sure that the schema is correct and valid in all environments, including the local host, for all the developers' machines, and then for development staging, production, whatever environment you have. You wanna make ... |
**Jon Calhoun:** That makes sense. I'm sure we've all ran into some of those issues where something seems to be working locally and it's not somewhere else, and database migrations can definitely be one of those cases where if you've done something locally and forgotten you've done it, it can have a big impact on wheth... |
\[04:11\] So to start here, I wanna talk a little bit about the tooling around it, because one of the questions we get asked a lot is "How should people be running these migrations? What sort of tooling should they be using? How do these tools even work?" And I think a lot of times this stems from the fact that people ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.