Public schema table embedding (#803)
* Alter fixture to test objects in public schema Properly erase and restore the public schema -- requires permissions to install pgcrypto each time. * Test for fks through public schema tables * Thanks @fab1an
This commit is contained in:
Vendored
+25
-23
@@ -12,31 +12,10 @@ SET standard_conforming_strings = on;
|
||||
SET check_function_bodies = false;
|
||||
SET client_min_messages = warning;
|
||||
|
||||
--
|
||||
-- Name: postgrest; Type: SCHEMA; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
CREATE SCHEMA public;
|
||||
CREATE SCHEMA postgrest;
|
||||
|
||||
|
||||
--
|
||||
-- Name: private; Type: SCHEMA; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
CREATE SCHEMA private;
|
||||
|
||||
|
||||
--
|
||||
-- Name: test; Type: SCHEMA; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
CREATE SCHEMA test;
|
||||
|
||||
|
||||
--
|
||||
-- Name: تست; Type: SCHEMA; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
CREATE SCHEMA تست;
|
||||
|
||||
|
||||
@@ -48,11 +27,13 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
||||
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
|
||||
--
|
||||
-- Name: jwt_token; Type: TYPE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TYPE jwt_token AS (
|
||||
CREATE TYPE public.jwt_token AS (
|
||||
token text
|
||||
);
|
||||
|
||||
@@ -142,6 +123,19 @@ CREATE FUNCTION always_true(test.items) RETURNS boolean
|
||||
AS $$ SELECT true $$;
|
||||
|
||||
|
||||
create table public_consumers (
|
||||
id serial not null unique,
|
||||
name text not null check (name <> ''),
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table public_orders (
|
||||
id serial not null unique,
|
||||
consumer integer not null references public_consumers(id),
|
||||
number integer not null,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
--
|
||||
-- Name: anti_id(test.items); Type: FUNCTION; Schema: public; Owner: -
|
||||
--
|
||||
@@ -161,6 +155,14 @@ CREATE TABLE موارد (
|
||||
|
||||
SET search_path = test, pg_catalog;
|
||||
|
||||
|
||||
create view orders_view as
|
||||
select * from public.public_orders;
|
||||
|
||||
create view consumers_view as
|
||||
select * from public.public_consumers;
|
||||
|
||||
|
||||
--
|
||||
-- Name: getitemrange(bigint, bigint); Type: FUNCTION; Schema: test; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user