Travis config
This commit is contained in:
parent
3d04103dbd
commit
4efecfbbab
13
.travis.yml
13
.travis.yml
@ -9,24 +9,23 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- env: POSTGRESQL_VERSION="9.6" POSTGIS_VERSION="2.5"
|
|
||||||
dist: xenial
|
|
||||||
- env: POSTGRESQL_VERSION="10" POSTGIS_VERSION="2.5"
|
|
||||||
dist: xenial
|
|
||||||
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
|
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
|
||||||
dist: xenial
|
dist: xenial
|
||||||
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
|
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
|
||||||
dist: bionic
|
dist: bionic
|
||||||
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
|
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
|
||||||
dist: bionic
|
dist: bionic
|
||||||
|
- env: POSTGRESQL_VERSION="13" POSTGIS_VERSION="3"
|
||||||
|
dist: bionic
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- sudo apt-get remove postgresql* -y
|
||||||
- sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests postgresql-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-server-dev-$POSTGRESQL_VERSION postgresql-common
|
- sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests postgresql-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-server-dev-$POSTGRESQL_VERSION postgresql-common
|
||||||
- if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi;
|
- if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi;
|
||||||
- sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis
|
- sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis
|
||||||
# For pre12, install plpython2. For PG12 install plpython3
|
# For pre12, install plpython2. For PG12 install plpython3
|
||||||
- if [[ $POSTGRESQL_VERSION != '12' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION python python-redis; else sudo apt-get install -y postgresql-plpython3-12 python3 python3-redis; fi;
|
- if [[ $POSTGRESQL_VERSION == '11' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION python python-redis; else sudo apt-get install -y postgresql-plpython3-$POSTGRESQL_VERSION python3 python3-redis; fi;
|
||||||
- sudo pg_dropcluster --stop $POSTGRESQL_VERSION main
|
- for i in $(pg_lsclusters | tail -n +2 | awk '{print $1}'); do sudo pg_dropcluster --stop $i main; done;
|
||||||
- sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION /var/ramfs/postgresql/$POSTGRESQL_VERSION
|
- sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION /var/ramfs/postgresql/$POSTGRESQL_VERSION
|
||||||
- sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- --auth-local trust --auth-host password
|
- sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- --auth-local trust --auth-host password
|
||||||
- export PGPORT=$(pg_lsclusters | grep $POSTGRESQL_VERSION | awk '{print $3}')
|
- export PGPORT=$(pg_lsclusters | grep $POSTGRESQL_VERSION | awk '{print $3}')
|
||||||
@ -39,4 +38,4 @@ after_failure:
|
|||||||
- cat regression.out
|
- cat regression.out
|
||||||
- cat regression.diffs
|
- cat regression.diffs
|
||||||
- echo $PGPORT
|
- echo $PGPORT
|
||||||
- cat /var/log/postgresql/postgresql-$POSTGRESQL_VERSION-main.log
|
- sudo cat /var/log/postgresql/postgresql-$POSTGRESQL_VERSION-main.log
|
||||||
|
20
README.md
20
README.md
@ -10,7 +10,7 @@ See [the cartodb-postgresql wiki](https://github.com/CartoDB/cartodb-postgresql/
|
|||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* PostgreSQL 9.6+ (with plpythonu extension and xml support). For PostgreSQL 12+ plpython3u is required instead of plpythonu.
|
* PostgreSQL 11+ (with plpythonu extension). For PostgreSQL 12+ plpython3u is required instead. Older versions might still work but they aren't actively tested or supported.
|
||||||
* [PostGIS extension](http://postgis.net)
|
* [PostGIS extension](http://postgis.net)
|
||||||
* Python with [Redis module](https://pypi.org/project/redis/)
|
* Python with [Redis module](https://pypi.org/project/redis/)
|
||||||
|
|
||||||
@ -39,23 +39,7 @@ Enable database
|
|||||||
In a database that needs to be turned into a "cartodb" user database, run:
|
In a database that needs to be turned into a "cartodb" user database, run:
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE EXTENSION postgis;
|
CREATE EXTENSION cartodb CASCADE;
|
||||||
CREATE EXTENSION cartodb;
|
|
||||||
```
|
|
||||||
|
|
||||||
Migrate existing cartodb database
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
When upgrading an existing cartodb user database, the cartodb extension
|
|
||||||
can be migrated from the "unpackaged" version. The procedure will copy
|
|
||||||
the data from ``public.CDB_TableMetada`` to ``cartodb.CDB_TableMetadata``,
|
|
||||||
re-cartodbfy all tables using old functions in triggers and drop the
|
|
||||||
cartodb functions from the 'public' schema. All new cartodb objects will
|
|
||||||
be in the "cartodb" schema.
|
|
||||||
|
|
||||||
```sql
|
|
||||||
CREATE EXTENSION postgis FROM unpackaged;
|
|
||||||
CREATE EXTENSION cartodb FROM unpackaged;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Update cartodb extension
|
Update cartodb extension
|
||||||
|
Loading…
Reference in New Issue
Block a user