Skip to content

A mock database used for testing query builders, orms, api frameworks, etc.

License

Notifications You must be signed in to change notification settings

endpoints/fantasy-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fantasy-database

A database with a few fantasy books in it for testing query builders, orms, rest frameworks, etc.

How does it work?

The schema is defined in schema.sql using MySQL compatible syntax (bleh) because SQLite doesn't seem to recognize PostgreSQL's serial datatype and won't auto-increment IDs when used. The seed data is defined in data.json.

If you are a node user, running npm install && npm start will rebuild the SQLite database file (which is checked into the root of this repository as fantasy.db).

How do I use it?

Make this repository a dependency of your project and automate the process of copying fantasy.db into your testing harness.

Because this repository is meant to be used by multiple programming languages, there are no affordances for auto-migrating your database (PRs welcome!). Use schema.sql as a reference for building migrations, and data.json for seeding if you'd like to test in something other than SQLite.

About

A mock database used for testing query builders, orms, api frameworks, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published