diff --git a/orator/schema/blueprint.py b/orator/schema/blueprint.py index d32aadd6..dcad46eb 100644 --- a/orator/schema/blueprint.py +++ b/orator/schema/blueprint.py @@ -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. diff --git a/orator/schema/grammars/postgres_grammar.py b/orator/schema/grammars/postgres_grammar.py index e1086f8b..7c7e5fbf 100644 --- a/orator/schema/grammars/postgres_grammar.py +++ b/orator/schema/grammars/postgres_grammar.py @@ -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"