Skip to content

Jakeii/nanoid-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

nanoid-postgres

Nanoid implementation in PostgreSQL PL/pgSQL

Requirements

  • Postgres with pgcrypto

Usage

Run the SQL file, or include the function in your database migrations

Use as the default value for your id columns!

CREATE TABLE users (
  "id" char(21) NOT NULL DEFAULT nanoid(),
  ...
)

Todo

  • Function that takes a custom alphabet

About

Nanoid implementation in PostgreSQL PL/pgSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published