Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/molizanee/postgresql-schema-extractor
A lightweight tool to automatically extract and document your PostgreSQL database schema. This tool generates a comprehensive JSON file containing detailed information about tables, columns, data types, constraints, and primary keys.
https://github.com/molizanee/postgresql-schema-extractor
javascript nodejs postgresql query schema
Last synced: 6 days ago
JSON representation
A lightweight tool to automatically extract and document your PostgreSQL database schema. This tool generates a comprehensive JSON file containing detailed information about tables, columns, data types, constraints, and primary keys.
- Host: GitHub
- URL: https://github.com/molizanee/postgresql-schema-extractor
- Owner: Molizanee
- Created: 2025-01-13T12:45:44.000Z (9 days ago)
- Default Branch: main
- Last Pushed: 2025-01-13T13:01:37.000Z (9 days ago)
- Last Synced: 2025-01-13T13:52:04.513Z (9 days ago)
- Topics: javascript, nodejs, postgresql, query, schema
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# PostgreSQL Schema Extractor
A lightweight tool to automatically extract and document your PostgreSQL database schema. This tool generates a comprehensive JSON file containing detailed information about tables, columns, data types, constraints, and primary keys.
## Features
- Extracts complete database schema including table structures
- Documents column properties (types, nullability, defaults)
- Identifies primary key constraints
- Saves schema in a well-structured JSON format
- Environment variable support for secure database connections## Configuration
Before running, set up your database connection details in a `.env` file:
```env
PG_USER=your_username
PG_HOST=your_host
PG_DATABASE=your_database
PG_PASSWORD=your_password
PG_PORT=5432
```## Usage
```bash
npm install
node index.js
```The schema will be generated in `./schema/database--schema.json`