sas1024 / gorm-loggable

Loggable plugin for GORM
MIT License
28 stars 22 forks source link

Switch to ansi sql JSON types, and remove uuid sql type #12

Closed Shelnutt2 closed 6 years ago

Shelnutt2 commented 6 years ago

This changes the ChangeLog struct to use only ansi sql datatypes so compatiblity is provided with databases besides postgresql. I've removed jsonb type, and I'm using the ansi sql json type instead, which can be represented as a string in the go struct.

The UUID sql type was removed, and the struct datatype was changed to be the uuid.UUID datatype. This datatype implements the sql.Value() and sql.Parse() interfaces so it can handle the conversion from the database.

These changes were tested on mariadb 10.2.

Closes #11