• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umbrellio / laravel-pg-extensions
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: sanitize
DEFAULT BRANCH: master
Repo Added 30 May 2019 11:54AM UTC
Files 42
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH 2.6.0
branch: 2.6.0
CHANGE BRANCH
x
Reset
  • 2.6.0
  • 2.0.0
  • 2.1.0
  • 2.2.0
  • 2.2.1
  • 2.2.2
  • 2.2.2.1
  • 2.2.2.2
  • 2.2.3
  • 2.2.4
  • 2.2.5
  • 2.2.6
  • 2.3.0
  • 2.4.0
  • 2.5.0
  • 2.5.1
  • 2.6.1
  • 2.7.0
  • 3.0.0
  • 4.0.0
  • 4.1.0
  • 4.1.1
  • 4.1.2
  • 4.2.0
  • 4.3.0
  • 4.4.0
  • 4.4.1
  • 4.5.2
  • add_ATTR_EMULATE_PREPARES_support
  • add_numeric_column_type
  • bug/connection
  • bug/connections
  • bug/extension
  • bug/fix-access
  • bug/postgres-connection
  • bug/tsrange
  • bugs/unique-constraints
  • build/migrate-github-actions
  • build/release
  • build/test-release
  • build/workflow
  • doctrine/refactor
  • extensions/initialize
  • feature/default-expression
  • feature/exclude-constraint
  • feature/exclude-gist
  • feature/extensions-support
  • feature/fix_get_pdo
  • feature/has-index
  • feature/refactor-extensionable
  • feature/triggers
  • feature/tsrange
  • feature/unique-wheres
  • feature/using
  • feature/views
  • fix-traits-namespace
  • fix/composer
  • fix/pdo_field
  • laravel12-pipeline
  • laravel_8_support
  • master
  • minor/badges
  • refactor-blueprint
  • sanitize
  • system/upgrade-dependencies
  • test-travis
  • tests
  • types/tsrange
  • upgrade/php7.4
  • upgrade/php8

pending completion
312

push

travis-ci

lazeevv
Added support creating EXCLUDE/CHECK constraints (#23)

EXCLUDE constraints
https://www.postgresql.org/docs/9.0/sql-createtable.html#SQL-CREATETABLE-EXCLUDE

Using the example below:

Schema::create('table', function (Blueprint $table) {
    $table->integer('type_id'); 
    $table->date('date_start'); 
    $table->date('date_end'); 
    $table->softDeletes();
    $table
        ->exclude(['date_start', 'date_end'])
        ->using('type_id', '=')
        ->using('daterange(date_start, date_end)', '&&')
        ->method('gist')
        ->with('some_arg', 1)
        ->with('any_arg', 'some_value')
        ->whereNull('deleted_at');
});
An Exclude Constraint will be generated for your table:

ALTER TABLE test_table
    ADD CONSTRAINT test_table_date_start_date_end_excl
        EXCLUDE USING gist (type_id WITH =, daterange(date_start, date_end) WITH &&)
        WITH (some_arg = 1, any_arg = 'some_value')
        WHERE ("deleted_at" is null)
CHECK constraints
https://www.postgresql.org/docs/9.4/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS

Using the example below:

Schema::create('table', function (Blueprint $table) {
    $table->integer('type_id'); 
    $table->date('date_start'); 
    $table->date('date_end'); 
    $table
        ->check(['date_start', 'date_end'])
        ->whereColumn('date_end', '>', 'date_end')
        ->whereIn('type_id', [1, 2, 3]);
});
An Check Constraint will be generated for your table:

ALTER TABLE test_table
    ADD CONSTRAINT test_table_date_start_date_end_chk
        CHECK ("date_end" > "date_start" AND "type_id" IN [1, 2, 3])

74 of 74 new or added lines in 8 files covered. (100.0%)

307 of 307 relevant lines covered (100.0%)

36.95 hits per line

Relevant lines Covered
Build:
Build:
307 RELEVANT LINES 307 COVERED LINES
36.95 HITS PER LINE
Source Files on 2.6.0
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
312 2.6.0 Added support creating EXCLUDE/CHECK constraints (#23) EXCLUDE constraints https://www.postgresql.org/docs/9.0/sql-createtable.html#SQL-CREATETABLE-EXCLUDE Using the example below: Schema::create('table', function (Blueprint $table) { ... push 06 Aug 2019 09:13PM UTC lazeevv travis-ci pending completion  
See All Builds (425)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc