Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 649 Bytes

File metadata and controls

44 lines (31 loc) · 649 Bytes

schmake

Save time creating your SQL schema with less keystrokes and the speed of Rust.

Note

Schmake currently only supports PostgreSQL

Usage

Create your first .schm file:

touch users.schm

Write the schema for your users table:

table users
id serial pk
team_id int fk teams(id)
name varchar
email varchar unique

Run schmake on that file:

schmake --file ./users.schm

And magic, you now have the definition for your users table

Constraints

Schmake provides a number of aliases for common constraints

  • PRIMARY KEY
    • pk
  • references
    • fk
  • NOT NULL
    • nn
    • not null