Move database package source code under pkg #1367
                
     Draft
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Move all database package files under the pkg module to make it cleaner and Go-compliant.
Requested at #1365
Note
Relocates the database module to packages/db/pkg and updates imports, sqlc outputs, Dockerfiles, and env handling in the DB client across the codebase.
packages/db/pkg(e.g.,pkg/client,pkg/queries,pkg/types); updatesqlc.yamloutputs topkg/queriesand type overrides topkg/types.pkg/client.NewClientto readPOSTGRES_CONNECTION_STRINGviaos.Getenvand error if unset.packages/db/Dockerfileto build migrator fromcmd/migrator; adjust paths; slim builder.packages/db/Makefilegenerate target topkg/queries.packages/db/go.moddeps; add/remove indirects.db/{client,queries,types,dberrors}todb/pkg/{client,queries,types,dberrors}across handlers, orchestrator, template-manager, utils, cache, edge pool, and team modules.packages/api/Dockerfileto copy./db/pkginstead of individual subdirs.db/pkg/*imports.replace github.com/e2b-dev/infra/packages/db => ../dbinpackages/shared/go.mod.packages/db/pkg/querieswith updated package paths.Written by Cursor Bugbot for commit 3b61f99. This will update automatically on new commits. Configure here.