docs(plan): V2 → V4 migration filename (V2/V3 already taken)
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
### Task 1: Flyway V2 migration adds `deployments.created_by`
|
||||
|
||||
**Files:**
|
||||
- Create: `cameleer-server-app/src/main/resources/db/migration/V2__add_deployment_created_by.sql`
|
||||
- Test: `cameleer-server-app/src/test/java/com/cameleer/server/app/storage/V2DeploymentCreatedByMigrationIT.java`
|
||||
- Create: `cameleer-server-app/src/main/resources/db/migration/V4__add_deployment_created_by.sql`
|
||||
- Test: `cameleer-server-app/src/test/java/com/cameleer/server/app/storage/V4DeploymentCreatedByMigrationIT.java`
|
||||
|
||||
- [ ] **Step 1: Write the failing IT**
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class V2DeploymentCreatedByMigrationIT extends AbstractPostgresIT {
|
||||
class V4DeploymentCreatedByMigrationIT extends AbstractPostgresIT {
|
||||
|
||||
@Autowired JdbcTemplate jdbc;
|
||||
|
||||
@@ -80,12 +80,12 @@ class V2DeploymentCreatedByMigrationIT extends AbstractPostgresIT {
|
||||
|
||||
- [ ] **Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `mvn -pl cameleer-server-app verify -Dit.test=V2DeploymentCreatedByMigrationIT`
|
||||
Run: `mvn -pl cameleer-server-app verify -Dit.test=V4DeploymentCreatedByMigrationIT`
|
||||
Expected: tests FAIL — column does not exist.
|
||||
|
||||
- [ ] **Step 3: Create the migration file**
|
||||
|
||||
`cameleer-server-app/src/main/resources/db/migration/V2__add_deployment_created_by.sql`:
|
||||
`cameleer-server-app/src/main/resources/db/migration/V4__add_deployment_created_by.sql`:
|
||||
|
||||
```sql
|
||||
ALTER TABLE deployments
|
||||
@@ -96,14 +96,14 @@ CREATE INDEX idx_deployments_created_by ON deployments (created_by);
|
||||
|
||||
- [ ] **Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `mvn -pl cameleer-server-app verify -Dit.test=V2DeploymentCreatedByMigrationIT`
|
||||
Run: `mvn -pl cameleer-server-app verify -Dit.test=V4DeploymentCreatedByMigrationIT`
|
||||
Expected: all 3 tests PASS.
|
||||
|
||||
- [ ] **Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add cameleer-server-app/src/main/resources/db/migration/V2__add_deployment_created_by.sql \
|
||||
cameleer-server-app/src/test/java/com/cameleer/server/app/storage/V2DeploymentCreatedByMigrationIT.java
|
||||
git add cameleer-server-app/src/main/resources/db/migration/V4__add_deployment_created_by.sql \
|
||||
cameleer-server-app/src/test/java/com/cameleer/server/app/storage/V4DeploymentCreatedByMigrationIT.java
|
||||
git commit -m "feat(deploy): V2 migration — add created_by to deployments"
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user