From:       To:      

Home > Documentation > SQLite to PostgreSQL

Synchronization in SQLite to PostgreSQL Converter

SQLite to PostgreSQL converter implements synchronization as combination of inserting SQLite rows that are not exist in the target table and update of existing PostgreSQL records with the source data. For synchronization purpose source and destination tables must have equal structures and have primary key or unique index defined.

Assume both SQLite and PostgreSQL databases have table "employees" defined as below:

        empno Integer NOT NULL, 
        first_name Varchar(20),
        last_name Varchar(20), 
        email Varchar(50), 
        Primary Key (empno)

This table has the following contents in SQLite database:

2  Andrew  White
3  Phil  Johnson

In PostgreSQL database:

1  John  Smith
2  Andew  White

After migrating SQLite data to PostgreSQL in "Synchronize" mode the source table is kept untouched and the destination table is modified as follows (pay attention to the cell marked red):

1  John  Smith
2  Andew  White
3  Phil  Johnson

Have any questions? Contact us