ordre sql
This commit is contained in:
11
compose.yaml
11
compose.yaml
@@ -183,7 +183,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
command:
|
command:
|
||||||
[
|
[
|
||||||
"--port", "${POSTGRAPHILE_PORT:-5000}",
|
"--port", "80",
|
||||||
"--schema", "${POSTGRAPHILE_SCHEMA:-public}",
|
"--schema", "${POSTGRAPHILE_SCHEMA:-public}",
|
||||||
"--enhance-graphiql",
|
"--enhance-graphiql",
|
||||||
"--cors",
|
"--cors",
|
||||||
@@ -195,14 +195,14 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- caddy_net
|
- caddy_net
|
||||||
environment:
|
environment:
|
||||||
- PGHOST=${POSTGRAPHILE_HOST:-database}
|
- PGHOST=database
|
||||||
- PGPORT=${POSTGRAPHILE_DB_PORT:-5432}
|
- PGPORT=5432
|
||||||
- PGUSER=${POSTGRAPHILE_DB_USER:-postgraphile}
|
- PGUSER=${POSTGRAPHILE_USER:-postgraphile_user}
|
||||||
- PGPASSWORD=${POSTGRAPHILE_PASSWORD:-9013}
|
- PGPASSWORD=${POSTGRAPHILE_PASSWORD:-9013}
|
||||||
- PGDATABASE=${COMPOSE_PROJECT_NAME}
|
- PGDATABASE=${COMPOSE_PROJECT_NAME}
|
||||||
labels:
|
labels:
|
||||||
caddy: postgraphile.localhost
|
caddy: postgraphile.localhost
|
||||||
caddy.reverse_proxy: "{{upstreams 5000}}"
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
caddy.tls: internal
|
caddy.tls: internal
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
@@ -229,6 +229,7 @@ services:
|
|||||||
PGRST_JWT_SECRET: ${POSTGREST_JWT_SECRET:-ChangeMeChangeMeChangeMeChangeMe}
|
PGRST_JWT_SECRET: ${POSTGREST_JWT_SECRET:-ChangeMeChangeMeChangeMeChangeMe}
|
||||||
PGRST_ADMIN_SERVER_PORT: 3055
|
PGRST_ADMIN_SERVER_PORT: 3055
|
||||||
PGRST_SERVER_PORT: 80
|
PGRST_SERVER_PORT: 80
|
||||||
|
PGRST_OPENAPI_SERVER_PROXY_URI: https://postgrest.localhost
|
||||||
networks:
|
networks:
|
||||||
- caddy_net
|
- caddy_net
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
set SEARCH_PATH to postgis,public;
|
set SEARCH_PATH to public,postgis;
|
||||||
|
|
||||||
create table point (
|
create table point (
|
||||||
id serial primary key,
|
id serial primary key,
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ create schema postgis;
|
|||||||
create extension if not exists postgis schema postgis;
|
create extension if not exists postgis schema postgis;
|
||||||
create extension if not exists pgrouting schema postgis;
|
create extension if not exists pgrouting schema postgis;
|
||||||
|
|
||||||
create extension if not exists ltree;
|
create schema ext;
|
||||||
create extension if not exists pgtap;
|
create extension if not exists ltree schema ext;
|
||||||
create extension if not exists pgcrypto;
|
create extension if not exists pgcrypto schema ext;
|
||||||
|
|
||||||
|
create schema pgtap;
|
||||||
|
create extension if not exists pgtap schema pgtap;
|
||||||
|
|
||||||
create table adherent (
|
create table adherent (
|
||||||
id int primary key,
|
id int primary key,
|
||||||
@@ -22,7 +25,7 @@ create table famille (
|
|||||||
code text primary key,
|
code text primary key,
|
||||||
famille text,
|
famille text,
|
||||||
code_parent text, -- references famille(code)
|
code_parent text, -- references famille(code)
|
||||||
arborescence ltree
|
arborescence ext.ltree
|
||||||
);
|
);
|
||||||
|
|
||||||
create table article (
|
create table article (
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
create role postgraphile nosuperuser nocreatedb nocreaterole noinherit noreplication nobypassrls
|
create role postgraphile_user nosuperuser nocreatedb nocreaterole noinherit noreplication nobypassrls
|
||||||
login password '9013';
|
login password '9013';
|
||||||
|
|
||||||
|
alter default privileges in schema public
|
||||||
|
grant select on tables to postgraphile_user;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
set SEARCH_PATH to public,pgtap;
|
||||||
|
|
||||||
SELECT plan(4);
|
SELECT plan(4);
|
||||||
|
|
||||||
SELECT is(
|
SELECT is(
|
||||||
@@ -26,3 +28,5 @@ SELECT is(
|
|||||||
|
|
||||||
-- Termine le test
|
-- Termine le test
|
||||||
SELECT * FROM finish();
|
SELECT * FROM finish();
|
||||||
|
|
||||||
|
\dx
|
||||||
@@ -1 +0,0 @@
|
|||||||
\dx
|
|
||||||
Reference in New Issue
Block a user