Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

add uuid field #368

Open
wants to merge 3 commits into
base: 0.9
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions orator/schema/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ def boolean(self, column):
"""
return self._add_column("boolean", column)

def uuid(self, column):
return self._add_column('uuid', column)

def enum(self, column, allowed):
"""
Create a new enum column on the table.
Expand Down
3 changes: 3 additions & 0 deletions orator/schema/grammars/postgres_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ def _type_timestamp(self, column):
def _type_binary(self, column):
return "BYTEA"

def _type_uuid(self, column):
return "UUID"

def _modify_nullable(self, blueprint, column):
if column.get("nullable"):
return " NULL"
Expand Down