SShortSingh.
Back to feed

Key Practices to Prevent Database Schema Migrations from Causing Production Outages

0
·1 views

Database schema migrations carry significant risk in production systems, as errors can be difficult to reverse once real data has passed through a changed schema. Experts recommend separating structural changes from data backfills into distinct steps, reducing the risk profile of each operation and making them individually reversible. Maintaining backward compatibility during deployment windows is also critical, since old and new application code often run simultaneously, and abrupt column renames can break older instances still in service. Migrations should be tested against datasets that match production scale, as operations appearing safe on small staging databases can cause severe locking issues on tables with millions of rows. Additionally, engineers must verify the exact locking behavior of each operation for their specific database engine and version, as seemingly similar changes can have vastly different performance and lock implications.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

LinkedIn's Dynamic CSS Classes Keep Breaking Third-Party Browser Extensions

A LinkedIn News blocker browser extension stopped working after LinkedIn's auto-generated CSS class names changed, severing the selectors the extension relied on to identify page elements. Modern front-end frameworks like React and Angular routinely rehash class names during build updates, even when the visible interface remains unchanged, making third-party tools fragile. The problem is compounded by potential A/B testing and regional variations, which can cause inconsistent failures across different users. Developers have identified three mitigation approaches: chasing updated selectors, using structural or text-based CSS selectors, and injecting custom data attributes via content scripts. Experts consider the last approach most robust, as it decouples the extension from LinkedIn's build process rather than depending on volatile platform-generated identifiers.

0
ProgrammingDEV Community ·

Open-Source Tool Reveals Hidden Token Waste in AI Coding Agents

A developer has released AI Agent Profiler, a local reverse proxy tool that sits between coding agents like Claude Code and LLM providers to track exactly how API tokens are spent. The tool found that only around 60% of API costs stem from actual user prompts, with the remaining 40% attributed to agent overhead such as subagent searches, context summaries, and session-title generation. A key cost driver identified is Claude Code's 5-minute cache expiry window, which forces expensive full cache rewrites on tokens exceeding 200K whenever a user steps away briefly. The profiler classifies requests into 11 categories and flags cold-cache regenerations with severity badges to help users understand idle-gap costs. The tool supports multiple providers including Anthropic, OpenAI, DeepSeek, AWS Bedrock, and Ollama, and can be installed via npm with zero telemetry.

0
ProgrammingDEV Community ·

University of Chicago Team Demonstrates Key Circuit for Topological Quantum Computing

Researchers at the University of Chicago have built a non-planar superconducting qubit using a crossbar 'waffle grid' of three horizontal and three vertical wires, forming nine Josephson junctions. Unlike conventional flat circuit designs, this geometry enables a mathematical property called Z3 combinatorial gauge symmetry when exposed to a controlled magnetic field. Experiments confirmed the circuit settled into six equivalent low-energy states, matching theoretical predictions and providing the first lab evidence of this symmetry in engineered hardware. This symmetry is considered a foundational requirement for creating quantum spin liquids, which in turn could serve as a platform for topological quantum computing. The findings were validated using neural-network variational Monte Carlo simulations, and the work establishes a critical building block for assembling larger, error-resistant quantum systems.

0
ProgrammingDEV Community ·

AirMeter Mod Streams Multimeter Readings Live to a Browser via ESP32

A YouTuber known as Bits und Bolts has built AirMeter, an open-source hardware mod that wirelessly streams live readings from an ANENG AN870 multimeter to a web browser or OBS. The project was created to solve the common filming problem of glare, focus hunting, and awkward camera angles when capturing multimeter screens. Because the meter's built-in UART port is physically disabled under epoxy, the mod instead uses an RP2040 microcontroller to directly sample the LCD's multiplexed analog signals, which are then converted to clean digital levels using LM339 comparators. The decoded readings are transmitted over a 433 MHz HC-12 radio link to an ESP32-C3, which hosts a local web page that faithfully recreates the meter's display. All schematics, board files, and firmware are publicly available, and the method can be adapted to other budget multimeters built on the same DTM0660 chip.

Key Practices to Prevent Database Schema Migrations from Causing Production Outages · ShortSingh