Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ForetagInc/surrealkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SurrealKit

Crates.io Documentation License

NOT FOR PRODUCTION USE | For SurrealDB v3

Manage SurrealDB migrations, seeding, and testing with ease. Inspired by Eloquent ORM's migration pattern.

Scope

This project is designed to manage SurrealDB migrations, seed, testing, and database management. It is not intended for production use and is specifically tailored for SurrealDB version 3.

If and when SurrealDB implements first-class tooling to manage migrations, seeding, and testing, SurrealKit will be deprecated in favour of the official SurrealDB tooling but intends to provide seamless transition.

Usage

Install via Cargo:

cargo install surrealkit

Initialise a new project:

surrealkit init

This creates a directory /database with the necessary scaffolding

The following ENV variables will be picked up for your .env file, SurrealKit assumes you're using SurrealDB as a Web Database.

  • PUBLIC_DATABASE_HOST
  • PUBLIC_DATABASE_NAMESPACE
  • PUBLIC_DATABASE_DATABASE
  • DATABASE_USERNAME
  • DATABASE_PASSWORD

A table (_migration) is generated and managed by SurrealKit on your configured database.

Seeding

Seeding will automatically run when you apply migrations. If you would like to reapply migrations, please re-apply your migrations.

surrealkit seed

About

Migrations, Seeding, Typegen and Testing for your SurrealDB apps

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Languages