---
# System prepended metadata

title: DB Migration
tags: [Migration, Plando, Document]

---

# DB Migration

###### tags: `Document` `Migration` `Plando`

## Tooling
We have choosed go tooling for all infra. So migration will be done in go.

For now we have just a mongodb instance.

## :leaves: Mongodb
[More about migrations mongodb](/s/BJ_zK5CSU)
- folder structure
- plando-infra
    - cmd/
        - migrations/main.go
        - seeds/main.go
    - migrations/*
    - seeds/*
    - docker-compose.yml
- commands
  - migrate new
  - migrate up
  - migrate down
  - seed new
  - seed up
  - seed down
- ci automation
    - on start db
        - migration up
    - on start db development(local/non-production-env)
        - seed up


