[DBIx-Class-Devel] [sql-translator] People/rporres/sqlite
autoincrement (#26)
Rafael Porres Molina
notifications at github.com
Tue Feb 12 11:25:00 GMT 2013
As stated in the SQLite docs, the behaviour of autoincrement changes when the column is a primary key.
http://www.sqlite.org/autoinc.html
Heres a summary of the changes included:
- I have patched SQL::Translator::Generator::DDL::SQLite to add the word AUTOINCREMENT to the primary keys column is detected as primary key.
- I've also patched 30sqlt-new-diff-sqlite.t and 48xml-to-sqlite.t as the new Generator broke some of the tests
- I've added a couple of tests in 56-sqlite-producer.t to prove the new feature.
- I've added my name and mail in the AUTHORS file as suggested by a Peter Rabbitson message in sqlfairy-developers mailing list
Please do take into account that I'm very new to SQL::Translator and I don't know if the changes and the implementation of them are in sync with the common practices of SQL::Translation.
Regards,
Rafa
PS. BTW, thanks for SQL::Translator. It's been __VERY__ helpful ;-)
You can merge this Pull Request by running:
git pull https://github.com/rporres/sql-translator people/rporres/sqlite-autoincrement
Or you can view, comment on it, or merge it online at:
https://github.com/dbsrgits/sql-translator/pull/26
-- Commit Summary --
* Fixed autoincrement in primary keys for SQLite
* removed EOL spaces
-- File Changes --
M AUTHORS (1)
M lib/SQL/Translator/Generator/DDL/SQLite.pm (5)
M t/30sqlt-new-diff-sqlite.t (4)
M t/48xml-to-sqlite.t (10)
M t/56-sqlite-producer.t (36)
-- Patch Links --
https://github.com/dbsrgits/sql-translator/pull/26.patch
https://github.com/dbsrgits/sql-translator/pull/26.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20130212/d01ca231/attachment.htm
More information about the DBIx-Class-Devel
mailing list