-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from nlopes/nlopes-add-postgres-tests
wip
- Loading branch information
Showing
8 changed files
with
264 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
-- Dumped from database version 15.2 | ||
-- Dumped by pg_dump version 15.4 (Homebrew) | ||
|
||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_table_access_method = heap; | ||
|
||
-- | ||
-- Name: __diesel_schema_migrations; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.__diesel_schema_migrations ( | ||
version character varying(50) NOT NULL, | ||
run_on timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: _sqlx_migrations; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public._sqlx_migrations ( | ||
version bigint NOT NULL, | ||
description text NOT NULL, | ||
installed_on timestamp with time zone DEFAULT now() NOT NULL, | ||
success boolean NOT NULL, | ||
checksum bytea NOT NULL, | ||
execution_time bigint NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: diesel_users; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.diesel_users ( | ||
id text NOT NULL, | ||
email text NOT NULL, | ||
created_at timestamp with time zone DEFAULT now() NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: sqlx_users; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.sqlx_users ( | ||
id character varying(32) NOT NULL, | ||
email text NOT NULL, | ||
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: __diesel_schema_migrations __diesel_schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.__diesel_schema_migrations | ||
ADD CONSTRAINT __diesel_schema_migrations_pkey PRIMARY KEY (version); | ||
|
||
|
||
-- | ||
-- Name: _sqlx_migrations _sqlx_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public._sqlx_migrations | ||
ADD CONSTRAINT _sqlx_migrations_pkey PRIMARY KEY (version); | ||
|
||
|
||
-- | ||
-- Name: diesel_users diesel_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.diesel_users | ||
ADD CONSTRAINT diesel_users_pkey PRIMARY KEY (id); | ||
|
||
|
||
-- | ||
-- Name: sqlx_users sqlx_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.sqlx_users | ||
ADD CONSTRAINT sqlx_users_pkey PRIMARY KEY (id); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
1 change: 1 addition & 0 deletions
1
fixtures/diesel/postgres/migrations/2023-08-27-215620_add_users/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- This file should undo anything in `up.sql` |
5 changes: 5 additions & 0 deletions
5
fixtures/diesel/postgres/migrations/2023-08-27-215620_add_users/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE diesel_users ( | ||
id TEXT PRIMARY KEY NOT NULL, | ||
email TEXT NOT NULL, | ||
created_at TIMESTAMPTZ DEFAULT NOW() NOT NULL | ||
); |
5 changes: 5 additions & 0 deletions
5
fixtures/sqlx/postgres/migrations/20230827160610_add_users.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE sqlx_users ( | ||
id VARCHAR(32) PRIMARY KEY NOT NULL, | ||
email TEXT NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
-- Dumped from database version 15.2 | ||
-- Dumped by pg_dump version 15.4 (Homebrew) | ||
|
||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_table_access_method = heap; | ||
|
||
-- | ||
-- Name: __diesel_schema_migrations; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.__diesel_schema_migrations ( | ||
version character varying(50) NOT NULL, | ||
run_on timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: _sqlx_migrations; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public._sqlx_migrations ( | ||
version bigint NOT NULL, | ||
description text NOT NULL, | ||
installed_on timestamp with time zone DEFAULT now() NOT NULL, | ||
success boolean NOT NULL, | ||
checksum bytea NOT NULL, | ||
execution_time bigint NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: diesel_users; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.diesel_users ( | ||
id text NOT NULL, | ||
email text NOT NULL, | ||
created_at timestamp with time zone DEFAULT now() NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: sqlx_users; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.sqlx_users ( | ||
id character varying(32) NOT NULL, | ||
email text NOT NULL, | ||
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: __diesel_schema_migrations __diesel_schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.__diesel_schema_migrations | ||
ADD CONSTRAINT __diesel_schema_migrations_pkey PRIMARY KEY (version); | ||
|
||
|
||
-- | ||
-- Name: _sqlx_migrations _sqlx_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public._sqlx_migrations | ||
ADD CONSTRAINT _sqlx_migrations_pkey PRIMARY KEY (version); | ||
|
||
|
||
-- | ||
-- Name: diesel_users diesel_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.diesel_users | ||
ADD CONSTRAINT diesel_users_pkey PRIMARY KEY (id); | ||
|
||
|
||
-- | ||
-- Name: sqlx_users sqlx_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.sqlx_users | ||
ADD CONSTRAINT sqlx_users_pkey PRIMARY KEY (id); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters