Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ src/main/java/com/mailengine/mailengine/

src/main/resources/
├── application.yaml # All config (reads from environment variables)
├── db/migration/ # Flyway SQL migrations (V1 – V22)
├── db/migration/ # Flyway SQL migrations (V1 is the full schema)
└── templates/ # CSV / XLSX import templates served at /template/csv and /template/xlsx
```

Expand Down Expand Up @@ -219,7 +219,7 @@ http://localhost:8080/swagger-ui.html → API docs

### 7. Log in with the seeded admin account

Migration `V21` seeds a default admin user:
Migration `V1` seeds a default admin user:

```
Email: admin@mailengine.internal
Expand Down Expand Up @@ -303,37 +303,17 @@ Schema is managed entirely by **Flyway**. Never edit the database by hand — ad

```
src/main/resources/db/migration/
V1__create_accounts.sql
V2__create_users.sql
V3__create_templates.sql
V4__create_recipient_lists.sql
V5__create_recipients.sql
V6__create_recipient_list_members.sql
V7__create_campaigns.sql
V8__create_campaign_recipient_lists.sql
V9__create_campaign_jobs.sql
V10__create_tracking_events.sql
V11__create_read_duration_events.sql
V12__create_engagement_scores.sql
V13__create_suppression_list.sql
V14__create_file_uploads.sql
V15__create_email_queue.sql
V16__fix_ip_address.sql
V17__add_tracking_tokens_to_email_queue.sql
V18__add_login_lockout.sql
V19__add_token_tables.sql
V20__add_message_id_to_email_queue.sql
V21__seed_admin.sql ← seeds the default admin account
V22__remove_multitenancy.sql ← dropped multi-tenant account_id columns
V23__fix_seed_admin_password.sql ← makes the seeded admin's password really ChangeMe123!
V1__initial_schema.sql ← the whole schema, plus the seeded admin account
```

The original V1–V26 history was squashed into `V1` (no database had to be kept). Every change from now on is a new file.

### Adding a migration

Create the next file in sequence:

```
src/main/resources/db/migration/V23__your_description.sql
src/main/resources/db/migration/V2__your_description.sql
```

Flyway applies it automatically on the next startup. **Never modify an already-applied migration** — Flyway checksums every file and will refuse to start if a previously applied file changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class FileUpload {
@Column(name = "skipped_rows") private Integer skippedRows;
@Column(name = "duplicate_rows") private Integer duplicateRows;

// Plain json, not jsonb: jsonb reorders keys and the columns must stay in file order (V26)
// Plain json, not jsonb: jsonb reorders keys and the columns must stay in file order
@JdbcType(PostgreSQLJsonPGObjectJsonType.class)
@Column(name = "column_preview")
private Map<String, Object> columnPreview;
Expand Down
20 changes: 0 additions & 20 deletions src/main/resources/db/migration/V10__create_tracking_events.sql

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/resources/db/migration/V12__create_engagement_scores.sql

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/resources/db/migration/V14__create_file_uploads.sql

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/resources/db/migration/V15__create_email_queue.sql

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/resources/db/migration/V16__fix_ip_address.sql

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/resources/db/migration/V18__add_login_lockout.sql

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/resources/db/migration/V19__add_token_tables.sql

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/resources/db/migration/V1__create_accounts.sql

This file was deleted.

Loading
Loading