Skip to content

πŸ”€ Data Migration from SQLite to PostgreSQL πŸ“¦

Notifications You must be signed in to change notification settings

temirovazat/sqlite-to-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SQLite to PostgreSQL

python dockerfile lint code style tests

Description

The goal of this project is to implement a script in Python to migrate data from SQLite to PostgreSQL. The data includes information about movies, people, and genres. The code utilizes data classes, context managers for establishing and closing connections, and handles read and write errors. Pytest is used to check data integrity between tables in both databases.

Technologies

Python SQLite PostgreSQL PyTest Pydantic Docker

How to Run the Project:

Clone the repository and navigate to the /infra directory:

git clone https://github.com/temirovazat/sqlite-to-postgres.git
cd sqlite-to-postgres/infra/

Create a .env file and add project settings:

nano .env
# PostgreSQL
POSTGRES_DB=cinemax_database
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=postgres
POSTGRES_PORT=5432

# SQLite
SQLITE_PATH=/opt/sqilte_to_postgres/db.sqlite

Deploy and run the project in containers:

docker-compose up

Along with PostgreSQL, the associated admin panel pgAdmin is launched at:

http://127.0.0.1:5050

About

πŸ”€ Data Migration from SQLite to PostgreSQL πŸ“¦

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published