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:

    Table1(
        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 a.white@corporation.com
3  Phil  Johnson p.johnson@gmail.com

In PostgreSQL database:

1  John  Smith j.smith@msn.com
2  Andew  White a.white@yahoo.com

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 j.smith@msn.com
2  Andew  White a.white@corporation.com
3  Phil  Johnson p.johnson@gmail.com

Have any questions? Contact us