GitScrum / Docs
Todas as Boas Práticas

Projetos de Desenvolvimento de Banco de Dados | GitScrum

Gerencie desenvolvimento de banco de dados e migrações usando GitScrum. Rastreie mudanças de schema e coordene com código de aplicação e deploys.

4 min de leitura

How to use GitScrum for database development projects?

Manage database work in GitScrum with dedicated labels (database, migration), coordinate with application code using dependencies, and document schema decisions in NoteVault. Track migrations separately, ensure deployment order, and review data changes. Coordinated database work reduces deployment failures by 50% [Source: Database Operations Research 2024].

Database workflow:

  • Design schema - Document in NoteVault
  • Create tasks - Migration + app changes
  • Label - Database, migration labels
  • Link tasks - Dependencies
  • Develop - Write migrations
  • Test - Local and staging
  • Deploy - DB first, app second
  • Database labels

    LabelPurpose
    type-databaseAll DB work
    migrationSchema changes
    data-migrationData transforms
    indexIndex changes
    performanceQuery optimization

    Migration task template

    ## Migration: [description]
    
    ### Changes
    - Add column X to table Y
    - Create index on Z
    
    ### Checklist
    - [ ] Write migration
    - [ ] Write rollback
    - [ ] Test locally
    - [ ] Review migration
    - [ ] Deploy to staging
    - [ ] Verify staging
    - [ ] Deploy to production
    - [ ] Verify production
    

    NoteVault database documentation

    DocumentContent
    Schema overviewEntity relationships
    Naming conventionsStandards
    Migration logChange history
    Performance guidesQuery optimization
    Backup/restoreProcedures

    Deployment order

    ScenarioOrder
    New columnDB → App (reads new)
    Remove columnApp (stops using) → DB
    New tableDB → App
    RenameNew → App → Remove old

    Backward compatible changes

    ChangeApproach
    Add columnNullable or default
    Add tableNo impact
    Add indexBackground if large
    Remove columnMulti-step

    Breaking change workflow

    StepAction
    1Add new (backward compatible)
    2Deploy app using new
    3Migrate data if needed
    4Remove old in separate deploy

    Migration review checklist

    CheckVerify
    Rollback existsCan undo
    Tested locallyWorks
    PerformanceAcceptable on large data
    LockingMinimal lock time
    DependenciesOrder correct

    Coordination with app teams

    TaskResponsibility
    Schema designDBA + Dev
    Migration writingDev
    Migration reviewDBA
    DeploymentDevOps
    VerificationQA + DBA

    Common database issues

    IssueSolution
    Long-running migrationTest on data copy
    Missing rollbackRequire in PR
    App/DB mismatchLinked tasks
    Lost changesMigration log

    Database task examples

    TaskType
    Add user preferences tablemigration
    Add index on orders.created_atindex
    Migrate user types to enumdata-migration
    Optimize slow queryperformance

    Related articles