Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ssherwood/schemago
Simple random schema generator
https://github.com/ssherwood/schemago
database generator postgresql schema
Last synced: about 2 months ago
JSON representation
Simple random schema generator
- Host: GitHub
- URL: https://github.com/ssherwood/schemago
- Owner: ssherwood
- License: mit
- Created: 2023-06-01T16:02:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-12T15:10:58.000Z (7 months ago)
- Last Synced: 2024-07-12T17:19:50.315Z (7 months ago)
- Topics: database, generator, postgresql, schema
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Schemago
Schemago is a simple CLI for generating randomized database schemas.
It is highly unlikely that you will ever need this tool.
## To Build
Requires golang 1.20+
```shell
$ go mod download
$ go build -v ./cmd/schemago
```## Usage
```shell
$ schemago [-tables n] [-columns m] [-enums=true|false] [-schema ]
```
### Options- `-tables` will generate the specific number of tables
- `-columns` will randomly generate up to this number of columns per table
- `-schema` will override the default random schema name with the one specified
- `-enums=` enable or disable enums during generation## Details
Use `schemago` to generate output that can be used as a starting schema for a randomly sized database. This tool is
primarily designed for testing databases for certain load and/or scale requirements.Column attributes are randomly generated with specific data types having higher frequency of being generated than
others. Appropriate lengths and defaults are also randomly generated with certain frequency that attempts to model a
somewhat realistic database schema.Indexes and Foreign Keys are also generated with a randomized frequency on appropriate data types.
## Future Enhancements
- Additional configuration options:
- Probability configurations
- Data types and frequency weights
- Additional randomized objects:
- Views
- Constraints
- Functions