···23232424### Database Migrations
25252626-Tumble uses [golang-migrate](https://github.com/golang-migrate/migrate) to manage database schemas. Migrations are automatically applied on application startup.
2626+Tumble uses **GORM AutoMigrate** to manage database schemas. Migrations are automatically applied on application startup.
27272828-- **Location**: Migration files are stored in `sql/mysql/` and `sql/sqlite/`.
2929-- **Versioning**: Files are named sequentially (e.g., `000001_init.up.sql`).
3030-- **Adding Migrations**: To change the schema, create a new numbered `.up.sql` file in the appropriate directory.
2828+- **Mechanism**: The application checks the database schema on startup and creates/updates tables to match the Go structs in `internal/data/store.go`.
31293230### Testing Infrastructure
3331···113111114112### 2. Initialize Database
115113116116-Run the setup script (works for both MySQL and SQLite):
117117-118118-```bash
119119-perl scripts/setup_database.pl
120120-```
121121-122122-That's it! The script will automatically detect your database type and create the necessary tables.
114114+Simply start the application! Tumble will automatically detect your database type (configured in `config.yaml` or via env vars) and create the necessary tables if they don't exist.
123115124116### 3. Configure Web Server
125117