Skip to content

Meta Types

Meta types capture request and client metadata.

TypeExpands To
col.ip()string(45) - IPv4 or IPv6
col.user_agent()string(500)
schemas/logs/access_log.js
export default table({
id: col.id(),
ip_address: col.ip(),
user_agent: col.user_agent(),
}).timestamps();

The 45-character limit accommodates IPv6 addresses:

IPv4: 192.168.1.1 (15 chars max)
IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 (39 chars)
IPv6-mapped IPv4: ::ffff:192.168.1.1 (45 chars max)

500 characters accommodates most browser user agent strings while preventing abuse from excessively long values.