[DBIx-Class-Devel] [sql-translator] Backward-compatible sqlite autoincrement (#47)

Ivan Baidakou notifications at github.com
Mon Dec 8 06:58:12 GMT 2014


Hello, 

Here is another attempt to introduce sqlite monotonic autoincrement which tries to be back-compatible.

Without extending ```SQL::Translator::Schema::Field``` I decided to use ```extra``` field to store type of autoincrement, which later could be re-used from Producer.

I hope this would be OK.

I tried to use it directly in ```DBIx::Class``` :

```perl

{ data_type => "integer", is_auto_increment => 1, is_nullable => 0, extra => { autoinc_method => 'sequence' } }

```

- it works that way. But how to specify extra more correctly in DBIx::Class? i..e outside of auto-generated sources?

Thanks for the great project!
You can merge this Pull Request by running:

  git pull https://github.com/basiliscos/p5-sql-translator master

Or you can view, comment on it, or merge it online at:

  https://github.com/dbsrgits/sql-translator/pull/47

-- Commit Summary --

  * Backward-compatible sqlite autoincrement

-- File Changes --

    M AUTHORS (1)
    M lib/SQL/Translator/Generator/DDL/SQLite.pm (14)
    M t/56-sqlite-producer.t (19)

-- Patch Links --

https://github.com/dbsrgits/sql-translator/pull/47.patch
https://github.com/dbsrgits/sql-translator/pull/47.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/47
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20141207/2e42ec79/attachment.htm>


More information about the DBIx-Class-Devel mailing list