dbsrgits / sql-translator

SQL::Translator (SQLFairy)
http://sqlfairy.sourceforge.net/
82 stars 91 forks source link

Implement EXCLUDE constraint for PostgreSQL #98

Closed KES777 closed 11 months ago

KES777 commented 7 years ago

This pull request will allow to generate next statement

ALTER TABLE subnets ADD CONSTRAINT subnets_subnet_udx  EXCLUDE USING gist ( subnet inet_ops with && ) WHERE state = 0;

with next syntax:

$sqlt_table->add_constraint(
    name       =>  'subnets_subnet_udx',
    type       =>  'exclude',
    fields     =>  'subnet',
    expression =>  'subnet inet_ops with &&',
    options    =>  { using => 'gist', where => 'state = 0' },
);
KES777 commented 6 years ago

Q: What is wrong with perl-5.8 here? A: Travis-CI team answer:

The command that's failing is "perl Makefile.PL && make test" and it seems to be failing to move beyond some questions posed during the "make". What does it do? Please review the process here, since the issue appears to be coming from your code. You may also try reproducing the problem with our Docker images. https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image

rabbiveesh commented 11 months ago

Hey, this is great, but it's incomplete + i can't push to your branch. I'm gonna close this and start a new PR on top of your commit, and i'll credit you in the changelog.

Thanks so much for contributing, even if there was a 6 year gap til it got picked up!

KES777 commented 11 months ago

@rabbiveesh Thanks for this.