Merge two magnetico databases - Forked from https://framagit.org/Glandos/magnetico_merge
Find a file
2021-01-04 13:43:44 +01:00
LICENSE Add LICENSE 2019-10-26 15:41:03 +02:00
magnetico_merge.py Merge remote-tracking branch 'origin/kescher/fix-typo' 2021-01-04 13:43:44 +01:00
README.md Support merging from postgresql into sqlite 2021-01-03 21:58:14 +01:00
requirements-pg.txt use pgcopy 2020-12-16 23:35:34 +01:00
requirements.txt add requirements 2019-10-26 15:36:14 +02:00

Merge magnetico databases

Very simple script to merge databases created by magnetico >=0.8

It supports merging SQLite database into SQLite or PostgreSQL, or merging PostgreSQL into SQLite.

Usage: magnetico_merge.py [OPTIONS] MAIN_DB MERGED_DB

Options:
  --fast  Try to go faster, by deleting indices and constraints while
          importing. PostgreSQL only. This can be really slower if your
          databases overlapped a lot.

  --help  Show this message and exit.

The MERGED_DB will be merged into MAIN_DB.

It requires python >= 3.6 and click

If you need to import into or load from PostgreSQL, you need to have psycopg2. Having pgcopy is faster when a lot of rows are in the files table.

Have fun.