-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backward-compatible sqlite autoincrement #47
Conversation
|
I also think that, for consistency, the |
Conflicts: t/56-sqlite-producer.t
|
OK, I have renamed auto_increment_method in extra field. Should I enhance |
| auto_increment_method => 'sequence', | ||
| }, | ||
| ); | ||
| my $expected = [ qq<CREATE TABLE "some_table" (\n "id" integer AUTOINCREMENT NOT NULL\n)>]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not actually valid in SQLite, AUTOINCREMENT can only be used immediately after INTEGER PRIMARY KEY, so field_autoinc() should be checking $self->_ipk($field) as well as $field->is_auto_increment and auto_increment_method.
|
Enhancing |
|
Indeed. Thanks for noting that. |
|
Hi, just looked over this in depth. The patch itself is good, naming not so much. Would you be opposed to the following changes: |
|
Applied with proposed changes as 7f3f64d. Thank you! |
|
Great 👍! |
|
On 10/12/2015 08:34 AM, karupanerura wrote:
In about another week. Sorry for the delay with this :/ |
Hello,
Here is another attempt to introduce sqlite monotonic autoincrement which tries to be back-compatible.
Without extending
SQL::Translator::Schema::FieldI decided to useextrafield 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:{ data_type => "integer", is_auto_increment => 1, is_nullable => 0, extra => { autoinc_method => 'sequence' } }Thanks for the great project!