Ticket #448 (new defect)
zone2sql --oracle SQL statements do not correspond to documented schema
| Reported by: | anon | Owned by: | ahu |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | auth | Version: | 3.0 |
| Severity: | normal | Keywords: | zone2sql oracle schema dml documentation |
| Cc: |
Description
When zone2sql is used with --oracle switch, the generated SQL code does not correspond to the schema as described in the official docummentation, specifically:
CREATE TABLE records (
id number(11) not NULL, domain_id INT DEFAULT NULL REFERENCES Domains(ID) ON DELETE CASCADE, name VARCHAR(255) DEFAULT NULL, type VARCHAR(10) DEFAULT NULL, content VARCHAR2(4000) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, change_date INT DEFAULT NULL, primary key (id)
);
however, the zone2sql --oracle generates DML statements as follows (example scrubbed for privacy / security reasons):
insert into Records (id,ZoneId?, name,type,content,TimeToLive?,Priority) select RECORDS_ID_SEQUENCE.nextval,id ,'host.subdomain.domain.tld', 'A', '1.2.3.4', 86400, 0 from Domains where name='subdomain.domain.tld'
*
ERROR at line 1: ORA-00904: "PRIORITY": invalid identifier
from the schema above, it is apparent that there is a disconnect between what the documented schema is, and what zone2sql thinks should be in the schema. There might be more discrepancies between zone2sql and the documented Oracle schema.