https://github.com/sakuro/upknit
Automatic UUID primary key enabler for rails + postgresql
https://github.com/sakuro/upknit
postgresql rails uuid
Last synced: 8 months ago
JSON representation
Automatic UUID primary key enabler for rails + postgresql
- Host: GitHub
- URL: https://github.com/sakuro/upknit
- Owner: sakuro
- License: mit
- Created: 2017-06-03T05:29:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-25T05:26:11.000Z (almost 8 years ago)
- Last Synced: 2025-02-01T10:22:40.238Z (over 1 year ago)
- Topics: postgresql, rails, uuid
- Language: Ruby
- Homepage:
- Size: 81.1 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README

# Upknit
Adding this gem to a Rails application with PostgreSQL automatically enables UUID primary key.
## Usage
Add this gem to your Rails application.
## Installation
Add this line to your application's Gemfile:
gem 'upknit'
And then execute:
$ bundle
## Internals
This gem does two things to enable UUID primary key.
1. Enable PostgreSQL's extension for calculation of UUID(v4).
2. Configure generators to use UUID
* as primary key for newly generated tables.
* as type of references.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).