Jump to content
emileverh

SQLite to MySQL

Recommended Posts

I have an invoicing app, there is 1 source and with conditional compiling I can create 2 differente .EXE's.  One for SQLite and one for MySQL ( I have one datamodule which really differs from both, which handles the connection, backup, etc.).  The question is I want to build myself(!) with Delphi of course an upgrade tool so that user can upgrade from SQLite to MySQL ( not from MySQL to SQLite ).  The datamodel is for both exact(!) the same on logical level, so all the indexes, foreign keys and constraints are the same. The model contains about 70 tables.

 

What is a good Delphi way to copy to SQLite data into to MySQL? Batchmove?! Or any other suggestions?! Pleas don't answer that there are commercial tools, I know that they exist. But I am thinking to deliver the end-user my own conversion tool. The question for you as reader is, how would you solve this? Any help is welcome. 

 

Greetz,
Emile

Share this post


Link to post
1 hour ago, emileverh said:

Batchmove

FDBatchmove, yes a good tool and if it is a one shot operation you don't need to run the program you can make all your ops during design time, changing tables or querys and using context menu to run it

 

but at runtime  with these conditions

Quote

The datamodel is for both exact(!) the same on logical level, so all the indexes, foreign keys and constraints are the same. The model contains about 70 tables.

should be esay too

Edited by Serge_G

Share this post


Link to post

Why don't you use SQLite DDL and adapt it to MySQL? This is not really complicated.

 

After creating your MySQL database run FDBatchmove (btw FDBatchmove is able to physically create missing table but is not capable of creating indexes nor foreign keys).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×