Skip to content

Commit

Permalink
Merge 1171a22 into 9eb4b12
Browse files Browse the repository at this point in the history
  • Loading branch information
pvsaintpe committed Jul 23, 2019
2 parents 9eb4b12 + 1171a22 commit 6a54d17
Show file tree
Hide file tree
Showing 24 changed files with 1,027 additions and 290 deletions.
125 changes: 112 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,122 @@
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$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
before_script:
- psql -c 'CREATE DATABASE testing;' -U postgres
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.2"
before_script:
- psql -c 'CREATE DATABASE testing;' -U postgres
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.3"
before_script:
- bash ./tests/travis/create-database.sh
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.4"
before_script:
- psql -c 'CREATE DATABASE testing;' -U postgres
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.5"
before_script:
- psql -c 'CREATE DATABASE testing;' -U postgres
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.6"
before_script:
- psql -c 'CREATE DATABASE testing;' -U postgres
- 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
- bash ./tests/travis/create-database.sh
- stage: Test
php: "7.3"
env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-postgres-11.sh
- psql -c 'CREATE DATABASE testing;' -U postgres
- stage: Test
php: "7.4snapshot"
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-postgres-11.sh
- psql -c 'CREATE DATABASE testing;' -U postgres
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ php composer.phar require umbrellio/laravel-pg-extensions

- [Extended `Schema::create()`](#extended-table-creation)
- [Extended `Schema` with GIST/GIN indexes](#create-gist/gin-indexes)
- [Extended `Schema` with USING](#extended-schema-using)
- [Working with unique indexes](#extended-unique-indexes-creation)
- [Working with partitions](#partitions)
- [Check existing index before manipulation](#check-existing-index)
Expand All @@ -30,6 +31,24 @@ Schema::create('table', function (Blueprint $table) {
});
```

### Extended Schema USING

Example:
```php
Schema::create('table', function (Blueprint $table) {
$table->integer('number');
});

//modifications with data...

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

### Create gist/gin indexes

```php
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "umbrellio/laravel-pg-extensions",
"description": "",
"type": "library",
"minimum-stability": "stable",
"authors": [
Expand All @@ -10,6 +11,7 @@
],
"require": {
"php": "^7.2",
"doctrine/dbal": "^2.9",
"laravel/framework": "^5.8"
},
"require-dev": {
Expand Down
Loading

0 comments on commit 6a54d17

Please sign in to comment.