I’m working on a custom plugin which, at this point, has no need for configuration options. I’ve been trying to figure out how to create a bare bones schema.lua file based on the examples shown here, but whenever I try to add the plugin to a service, I’m getting a schema violation error:
{
"message": "primary key violation on key '{id=\"a691beab-1bc4-4dd2-8a4e-5487c1108b6f\"}'",
"name": "primary key violation",
"fields": {
"id": "a691beab-1bc4-4dd2-8a4e-5487c1108b6f"
},
"code": 3
}
Here’s what I have so far in my schema.lua file:
local typedefs = require "kong.db.schema.typedefs"
return {
name = "myplugin",
fields = {
{
consumer = typedefs.no_consumer
},
},
}
How does one create an effectively empty schema.lua? Thanks in advance