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`
|
### Task 1: Flyway V2 migration adds `deployments.created_by`
|
||||||
|
|
||||||
**Files:**
|
**Files:**
|
||||||
- Create: `cameleer-server-app/src/main/resources/db/migration/V2__add_deployment_created_by.sql`
|
- 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/V2DeploymentCreatedByMigrationIT.java`
|
- Test: `cameleer-server-app/src/test/java/com/cameleer/server/app/storage/V4DeploymentCreatedByMigrationIT.java`
|
||||||
|
|
||||||
- [ ] **Step 1: Write the failing IT**
|
- [ ] **Step 1: Write the failing IT**
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
class V2DeploymentCreatedByMigrationIT extends AbstractPostgresIT {
|
class V4DeploymentCreatedByMigrationIT extends AbstractPostgresIT {
|
||||||
|
|
||||||
@Autowired JdbcTemplate jdbc;
|
@Autowired JdbcTemplate jdbc;
|
||||||
|
|
||||||
@@ -80,12 +80,12 @@ class V2DeploymentCreatedByMigrationIT extends AbstractPostgresIT {
|
|||||||
|
|
||||||
- [ ] **Step 2: Run test to verify it fails**
|
- [ ] **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.
|
Expected: tests FAIL — column does not exist.
|
||||||
|
|
||||||
- [ ] **Step 3: Create the migration file**
|
- [ ] **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
|
```sql
|
||||||
ALTER TABLE deployments
|
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**
|
- [ ] **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.
|
Expected: all 3 tests PASS.
|
||||||
|
|
||||||
- [ ] **Step 5: Commit**
|
- [ ] **Step 5: Commit**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git add cameleer-server-app/src/main/resources/db/migration/V2__add_deployment_created_by.sql \
|
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/V2DeploymentCreatedByMigrationIT.java
|
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"
|
git commit -m "feat(deploy): V2 migration — add created_by to deployments"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user