Sample Header Ad - 728x90

SQLite database Upgrade Schema without loosing data

1 vote
1 answer
1278 views
I have a small C# Windows Forms application. It uses SQLite DB on the client's PC. I started with a Schema DB and with time I added more tables and columns to my local DB (not the client's). I want to upgrade the client's DB Schema without losing data. So far I could update the schema but some information is lost because of drop tables and recreating them. Can anyone help me? This is an example of 2 tables. I just add new columns. No easy diagram generator for SQLite. Add **** for added columns **Table Usuarios** CLIENT
UserId           Integer                   
NombreUsuario    TEXT                      
Password         TEXT                      
ProfesionID      Integer    
Mail             TEXT
**Table Usuarios NEW VERSION**
UserId           Integer   
NombreUsuario    TEXT    
Password         TEXT     
ProfesionID      Integer   
Mail             TEXT    
UseImages        Integer  ****  
Color            Integer  ****  
BackUpDate       TEXT     ****
**Table EquiposHabilitados CLIENT**
EquipoID       TEXT
**Table EquiposHabilitados NEW VERSION**
Equipo                   TEXT    ****     
EquipoID                 TEXT       
EquipoFechaVencimiento   TEXT    ****     
UltimoTiempo             TEXT    ****
Asked by Guillermo (23 rep)
Mar 24, 2022, 09:39 PM
Last activity: Apr 9, 2025, 08:04 AM