Skip to content

Commit

Permalink
Merge 5d11917 into 0e7964e
Browse files Browse the repository at this point in the history
  • Loading branch information
pvsaintpe committed Aug 4, 2019
2 parents 0e7964e + 5d11917 commit 59cf7cc
Show file tree
Hide file tree
Showing 33 changed files with 2,457 additions and 655 deletions.
120 changes: 107 additions & 13 deletions .travis.yml
@@ -1,23 +1,117 @@
language: php
sudo: false
dist: trusty

php:
- 7.2
cache:
directories:
- vendor
- $HOME/.composer/cache

services:
- postgresql

matrix:
fast_finish: true
before_install:
- phpenv config-rm xdebug.ini || true
- |
if [ "x$COVERAGE" == "xyes" ]; then
pecl install pcov-1.0.0
fi
install:
- composer install

before_script:
- psql -c 'create database testing;' -U postgres
- rm composer.lock
- travis_retry composer -n update --prefer-dist

script:
- vendor/bin/ecs check --config=ecs.yml .
- phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- |
if [ "x$DOCKER_POSTGRES" == "xyes" ]; then
sudo docker exec -ti postgres11 psql postgres -U postgres -c "CREATE DATABASE testing"
else
psql -c 'CREATE DATABASE testing;' -U postgres
fi
- |
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpunit --configuration phpunit.travis.xml --coverage-clover build/logs/clover.xml
else
./vendor/bin/phpunit --configuration phpunit.travis.xml
fi
after_success:
- travis_retry vendor/bin/php-coveralls -v
- |
if [ "x$COVERAGE" == "xyes" ]; then
travis_retry vendor/bin/php-coveralls -v
fi
matrix:
fast_finish: true
allow_failures:
- php: "7.4snapshot"
include:
- stage: Test
php: "7.2"
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
services:
- docker
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.2"
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.3"
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.4"
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.5"
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.6"
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
sudo: required
services:
- postgresql
addons:
postgresql: "9.6"
before_script:
- bash ./tests/travis/install-postgres-10.sh
- stage: Test
php: "7.3"
env: DB=pgsql DOCKER_POSTGRES=yes POSTGRESQL_VERSION=11.0 COVERAGE=yes
sudo: required
services:
- docker
- postgresql
addons:
postgresql: "9.6"
before_script:
- bash ./tests/travis/install-postgres-11.sh
- stage: Test
php: "7.4snapshot"
env: DB=pgsql DOCKER_POSTGRES=yes POSTGRESQL_VERSION=11.0
sudo: required
services:
- docker
- postgresql
before_script:
- bash ./tests/travis/install-postgres-11.sh
18 changes: 14 additions & 4 deletions README.md
Expand Up @@ -15,7 +15,8 @@ php composer.phar require umbrellio/laravel-pg-extensions
## Features

- [Extended `Schema::create()`](#extended-table-creation)
- [Extended `Schema` with GIST/GIN indexes](#create-gist/gin-indexes)
- [Added Support Numeric Type](#numeric-column-type)
- [Extended `Schema` with USING](#extended-schema-using)
- [Extended `Schema` for views](#create-views)
- [Working with unique indexes](#extended-unique-indexes-creation)
- [Working with partitions](#partitions)
Expand All @@ -31,12 +32,21 @@ Schema::create('table', function (Blueprint $table) {
});
```

### Create gist/gin indexes
### Extended Schema USING

Example:
```php
Schema::create('table', function (Blueprint $table) {
$table->gist(['column1', 'column2']);
$table->gin('column1');
$table->integer('number');
});

//modifications with data...

Schema::table('table', function (Blueprint $table) {
$table
->string('number')
->using("('[' || number || ']')::character varyiing")
->change();
});
```

Expand Down
2 changes: 2 additions & 0 deletions composer.json
Expand Up @@ -10,10 +10,12 @@
],
"require": {
"php": "^7.2",
"doctrine/dbal": "^2.9",
"laravel/framework": "^5.8"
},
"require-dev": {
"umbrellio/code-style-php": "^1.0",
"codeception/codeception": "^3.0",
"orchestra/testbench": "^3.5",
"php-coveralls/php-coveralls": "^2.1"
},
Expand Down

0 comments on commit 59cf7cc

Please sign in to comment.