Skip to content
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

Support for remaining FK ON UPDATE/ON DELETE actions #21

Closed
wants to merge 1 commit into from

Conversation

fgabolde
Copy link
Contributor

@fgabolde fgabolde commented Oct 3, 2012

Hi,

This patch should add the missing support for ON UPDATE (resp. DELETE) SET NULL, SET DEFAULT and NO ACTION. So far only ON UPDATE CASCADE and ON UPDATE RESTRICT were implemented because they were the only ones matching the grammar (ON UPDATE \w+ did not match actions with spaces).

As a side effect it also restricts ON UPDATE and ON DELETE to only be valid actions as per the SQLite grammar here: http://www.sqlite.org/lang_createtable.html (as before this I assume ON UPDATE STUFF happily parsed to is($constraint->on_update, "STUFF")).

…s for SQLite.

According to the documentation this should be all of them (with the existing
support of CASCADE and RESTRICT).
@fgabolde
Copy link
Contributor Author

fgabolde commented Oct 3, 2012

I forgot to mention it but on a fresh git clone, "prove -lrvm t/60roundtrip.t" always fails because of a missing file. I assume the file is generated by the build script, but the inc/ directory is also missing from the repository.

The README also mentions a Build.PL script which is evidently not there anymore.

@ribasushi
Copy link
Contributor

Finally merged as 565563b9. Sorry for the delay.

@ribasushi ribasushi closed this Mar 9, 2013
@ribasushi
Copy link
Contributor

As far as your other notes - this distribution uses Module::Install. It is very common and very easy to work with - you simply need to have it installed, and then you run perl Makefile.PL. It will generate the missing pieces for you.

Note that inc/ may NEVER appear in a repository - it is always generated user-side via the Module::Install present on your side. The only time when inc/ ships to the user is when distributing on CPAN (as part of the tarball), in which case none of the extra author-only requirements are active, and no data regeneration takes place.

I grepped throughout the distribution and did not find any references to Build.PL. Can you point out where you saw these?

@fgabolde
Copy link
Contributor Author

fgabolde commented Mar 9, 2013

Well, the README mentioned Build.PL pretty explicitly. But there doesn't seem to be a README in the repo now. It was there when I forked, though, and you can still find it in past changesets.

@ribasushi
Copy link
Contributor

Ah right, the readme is now autogenerated from the main pod (which has since been edited): c45d3cb

Any other issues with the dist as seen in the repo and/or the dist https://metacpan.org/release/SQL-Translator ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants