Data
Data
- The data layer: How the db package finds its connection, turns method calls into SQL, and why it works the way it does.
- Migrations: Migrations are Go values compiled into your binary. The runner applies them in ID order, records each one in the
migrationstable with the batch it ran in, and wraps each in a transaction where the database allows it. A database lock keeps two instances from migrating at once.