WhyAskWhy / mysql2sqlite

Query MySQL database and mirror relevant tables to a local SQLite database.
GNU General Public License v2.0
0 stars 1 forks source link

Decide on an approach to refreshing table contents #2

Open deoren opened 6 years ago

deoren commented 6 years ago

In the SQLite database I'll need to decide whether the main script handles dropping existing tables or just the contents of the tables.

The current version I'm working with handles dropping table contents only and doesn't take into account schema changes, either at MySQL or SQLite level. Is this intended, with the goal of having a migration script handle updating table structure or should we just nuke the entire file on each run?

deoren commented 6 years ago

There is probably good reason to not nuke the actual file: permissions on the file may be greater than the surrounding directory, thus if we nuke the file we may be unable to recreate the file, but if we nuke the tables within the file we leave the granted permissions on the file intact.