Subject: | wish: Outdated SQLite3 FOREIGN KEY support |
Date: | Thu, 10 May 2012 22:29:06 +0200 |
To: | bug-Parse-Dia-SQL [...] rt.cpan.org |
From: | Slavko <linux [...] slavino.sk> |
Hi,
i am using the parse-dia-sql 0.20 under Debian testing amd64 and i am
working with SQLite3 3.7.11.
The SQLite3 foreign keys was improved and from version 3.6.19 there is
direct support for this constraint in SQLite, as described here
http://sqlite.org/foreignkeys.html
The described constraints syntax is more readable and straightforward,
than triggers generated by parsediasql now.
By default is foreign keys support disabled in SQLite yet, but can be
enabled by "PRAGMA foreign_keys = ON;" command (described i mentioned
link), then good idea can be add this command to start of the file.
The new syntax now can be, for example:
CREATE TABLE table_name(
some_id INTEGER,
some_other INTEGER,
FOREIGN KEY(some_other) REFERENCES another_table(another_id)
);
or the same by other way:
CREATE TABLE table_name(
some_id INTEGER,
some_other REFERENCES another_table(another_id)
);
please, can you add this, more clean and more common, syntax support to
your parser?
regards
--
Slavko
http://slavino.sk
Message body not shown because it is not plain text.