<div dir="ltr"><div>Ping?</div><div><br></div><div>Thanks for any help!</div><div><br></div><div>-m<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 29, 2023 at 3:08 PM Matt Zagrabelny <<a href="mailto:mzagrabe@d.umn.edu">mzagrabe@d.umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Greeting Kea Users,</div><div><br></div><div>I'm attempting to insert a record into the dhcp4_subnet table, but am hitting an error:</div><div><br></div><div>INSERT INTO dhcp4_subnet (<br>    subnet_id,<br>    subnet_prefix<br>)<br>VALUES (<br>    10123,<br>    '<a href="http://10.168.255.0/24" target="_blank">10.168.255.0/24</a>'<br>);<br>ERROR:  insert or update on table "dhcp4_audit" violates foreign key constraint "fk_dhcp4_audit_revision"<br>DETAIL:  Key (revision_id)=(0) is not present in table "dhcp4_audit_revision".<br>CONTEXT:  SQL statement "INSERT INTO dhcp4_audit (object_type, object_id, modification_type, revision_id)<br>            VALUES (object_type_val, object_id_val,<br>                (SELECT id FROM modification WHERE modification_type = modification_type_val),<br>                 audit_revision_id)"<br>PL/pgSQL function createauditentrydhcp4(character varying,bigint,character varying) line 12 at SQL statement<br>SQL statement "SELECT createAuditEntryDHCP4('dhcp4_subnet', NEW.subnet_id, 'create')"<br>PL/pgSQL function func_dhcp4_subnet_ains() line 3 at PERFORM</div><div><br></div><div>Looking at the schema of the dhcp4_audit table makes me think I shouldn't be manually manipulating the dhcp4_audit table.<br></div><div><br></div><div>Does anyone have an idea of what I'm doing wrong? or a successfully working example of inserting a subnet into the dhcp4_subnet table?</div><div><br></div><div>Thanks for the help!</div><div><br></div><div>-m<br></div></div>
</blockquote></div>