sqlite-utils-move-tables
Command for sqlite-utils to move tables from one database to another
Installation
Install this plugin in the same environment as sqlite-utils.
sqlite-utils install sqlite-utils-move-tables
Usage
This plugin adds a single command, sqlite-utils move-tables. The command can be used to move one or more tables from one database file to another.
sqlite-utils move-tables origin.db destination.db tablename
You can pass multiple tables to the command to move multiple tables in one go:
sqlite-utils move-tables origin.db destination.db table1 table2
A moved table will have its columns and primary keys recreated and all data copied across to the new database. The original table will then be dropped.
Foreign key constraints, indexes and triggers will not be copied across.
To keep the original table, use --keep:
sqlite-utils move-tables origin.db destination.db tablename --keep
The command checks for the existence of all of the tables in the first database, and ensures they do not yet exist in the second database. It will show an error if either of these conditions are not meant.
To ignore that error and fail silently if a table is missing or already created, use --ignore.
To over-write and replace a table in the destination database with a name that matches one of the tables to be moved, use --replace.
It is advisable to create a copy of your origin database before running this command!
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd sqlite-utils-move-tables
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for sqlite-utils-move-tables 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlite-utils-move-tables-0.1.tar.gz | 7.9 kB | Without provenance | Details for sqlite-utils-move-tables-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqlite_utils_move_tables-0.1-py3-none-any.whl | Python 3 | none | any | Details for sqlite_utils_move_tables-0.1-py3-none-any.whl |
Total release size: 15.6 kB
Release files / sqlite-utils-move-tables-0.1.tar.gz
| Download URL | sqlite-utils-move-tables-0.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40cd90305f8bd56082961c86a91d3a6e2bc428e1b31b41d768759158695d79df
|
|
BLAKE2b-256 checksum How to use checksums |
a8ef91bb48cd6cc8cff227027cdd7768cbbe69cf5007d2a55f072ee01efd277d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / sqlite_utils_move_tables-0.1-py3-none-any.whl
| Download URL | sqlite_utils_move_tables-0.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bf4dd3b6d5b5a354f3e96a410336520c04012dabc05ddee437c478214088ca9
|
|
BLAKE2b-256 checksum How to use checksums |
5446c06888732393623fa1a2d9e7c84954707aaf46d2be8c962d2581efe6d598
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for sqlite-utils-move-tables 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.