This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
alexpdp7/pypgdev
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DESCRIPTION Tools for PostgreSQL database development pg_docker starts and connects to docker PostgreSQL instances, storing its data in your local filesystem. pg_docker_schema_diff gives you a schema diff between two instances' data dirs. INSTALLATION We don't have any serious releases of pypgdev. To play around, you can install it with pipx: $ pipx install --spec git+https://github.com/alexpdp7/pypgdev.git pypgdev Then you should be able to use the pg_docker_* commands. DEVELOPMENT INSTALLATION $ git clone git@github.com:alexpdp7/pypgdev.git $ mkvirtualenv --python=/usr/bin/python3 pypgdev $ pip install -e . USAGE $ pg_docker ... TUTORIAL Start and connect to a new database: $ pg_docker tutorial psql (10.0) Type "help" for help. postgres=# The database data files are right in your system in the tutorial directory; you can even cp -a the folder and start a new identical and independent clone of the database to try new changes, for instance. SCHEMA DIFF $ pg_docker foo # create table foo ( bar serial primary key ); # \q $ cp -r foo bar $ pg_docker bar # alter table foo add column baz text not null; # \q $ pg_docker_schema_diff foo bar [...] CREATE TABLE foo ( ! bar integer NOT NULL ); [...] CREATE TABLE foo ( ! bar integer NOT NULL, ! baz text NOT NULL ); [...]
About
Python Postgres Development Tools
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published