leafo / lapis

A web framework for Lua and OpenResty written in MoonScript
http://leafo.net/lapis/
MIT License
3.14k stars 247 forks source link

Add UUID as postgres table type #726

Closed tommy-mor closed 3 years ago

tommy-mor commented 3 years ago

did I mess something up here? I would like this.

tommy-mor commented 3 years ago

for postgres, for uuid_generate_v4 to work you must run

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

So not sure how to integrate that.

leafo commented 3 years ago

You can write a migration to do that. I don't think Lapis needs to do anything out of the ordinary here, pgmoon will treat UUID types as strings when loaded from the database.