Mirror of https://github.com/roostorg/coop
github.com/roostorg/coop
1# Database Migrator
2
3This package handles database schema migrations and seed data.
4
5## Concepts
6
7### Migrations vs Seeds
8
9| Type | Purpose | When it runs |
10| :---- | :---- | :---- |
11| **Migration** | Schema changes (tables, columns, indexes) | All environments |
12| **Seed** | Test fixtures and environment-specific data | Single environment only |
13
14### How Seeds Work
15
16Seeds are timestamped and run interspersed with migrations (not after). This ensures each seed script runs against the exact schema it was written for, preventing breakage from future schema changes.
17
18## Usage
19
20See `db/README.md` for CLI commands and setup instructions.