Skip Menu |
 

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 78289
Status: new
Priority: 0/
Queue: SQL-Translator

People
Owner: Nobody in particular
Requestors: karl.forner [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.11012
Fixed in: (no value)



Subject: SQLite producer do not output PRIMARY keys unless using intermduate YAML representation
Download (untitled) / with headers
text/plain 1.4k
Hello, Using an oracle database. If I directly try to produce the SQLite schema, like: sqlt -f DBI --dsn dsn --db-user user--db-password pwd--quote-field-names -t SQLite > foo.sqlite Then foo.sqlite does not have any primary key: CREATE TABLE "GECKO_BIOMARKER" ( "BIOMARKER_ID" NUMBER(126) NOT NULL, "PARENT_BIOMARKER_ID" NUMBER(126), "BIOMARKER_TYPE_ID" NUMBER(126) NOT NULL, "BIOMARKER_NAME" VARCHAR2(45) NOT NULL, FOREIGN KEY ("BIOMARKER_TYPE_ID") REFERENCES "GECKO_BIOMARKER_TYPE"("BIOMARKER_TYPE_ID"), FOREIGN KEY ("PARENT_BIOMARKER_ID") REFERENCES "GECKO_BIOMARKER"("BIOMARKER_ID") ); BUT if I do it in two steps: sqlt -f DBI --dsn dsn --db-user user--db-password pwd--quote-field-names -t YAML> foo.yaml sqlt -f YAML foo.yaml -t SQLite > foo.sqlite --quote-field-names then the output is (at least seems) correct: CREATE TABLE "GECKO_BIOMARKER" ( "BIOMARKER_ID" INTEGER PRIMARY KEY NOT NULL, "PARENT_BIOMARKER_ID" NUMBER(126), "BIOMARKER_TYPE_ID" NUMBER(126) NOT NULL, "BIOMARKER_NAME" VARCHAR2(45) NOT NULL, FOREIGN KEY ("BIOMARKER_TYPE_ID") REFERENCES "GECKO_BIOMARKER_TYPE"("BIOMARKER_TYPE_ID"), FOREIGN KEY ("PARENT_BIOMARKER_ID") REFERENCES "GECKO_BIOMARKER"("BIOMARKER_ID") ); SQL::Translator v0.11012 This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi Linux chge1x0039 2.6.16.60-0.85.1-smp #1 SMP Thu Mar 17 11:45:06 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.