Skip to content

sclee15/nimigration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nimigration

A Nim DB Schema Migration based on Allographer

Example

import "nimigration"

migration Migration001:
  schema([
    table("yo1", [
      Column().increments("id"),
      Column().string("name"),
      Column().foreign("auth_id").reference("id").on("auth").onDelete(SET_NULL)
    ])
  ]),
  

let migrations = @[
  Migration001()
]

migrate(migrations)