Meta Types
Meta types capture request and client metadata.
Reference
Section titled “Reference”| Type | Expands To |
|---|---|
col.ip() | string(45) - IPv4 or IPv6 |
col.user_agent() | string(500) |
Example
Section titled “Example”export default table({ id: col.id(), ip_address: col.ip(), user_agent: col.user_agent(),}).timestamps();IP Address Length
Section titled “IP Address Length”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)User Agent
Section titled “User Agent”500 characters accommodates most browser user agent strings while preventing abuse from excessively long values.