12.4 Switching embedding providers

Goal: move from text-embedding-3-small (1536-dim) to text-embedding-3-large at the same 1536-dim.

This is a same-dimension switch, so no schema change is needed. The full procedure lives in Embedding Migration; the summary:

  1. Back up the database.
  2. Edit <tomcat>/webapps/ROOT/WEB-INF/backend/application.ini:
    EMBEDDING_MODEL    = text-embedding-3-large
    REEMBED_ON_STARTUP = true
    
  3. Restart:
    sudo systemctl restart ownsona.service
    
  4. Watch the log:
    journalctl -u ownsona.service -f | grep reembed
    
  5. Verify all rows moved:
    sudo -u ownsona psql -d ownsona -c \
      "SELECT embedding_model, count(*) FROM memories GROUP BY 1;"
    
  6. Update the source-tree application.ini so the next WAR build matches.

A different-dimension switch adds one step: write a migration class that resizes the vector column. See Procedure B: different-dimension switch.