Fixture updates (#104)

fixed-fixtures
This commit is contained in:
djrobstep 2019-12-10 16:05:58 +11:00 committed by GitHub
parent f823fdc036
commit 2ba2f3209c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 23 additions and 20 deletions

View File

@ -3,8 +3,8 @@ jobs:
build:
working_directory: ~/circleci
docker:
- image: circleci/python:3.7.2
- image: circleci/postgres:11
- image: circleci/python:3.8.0
- image: circleci/postgres:12
environment:
POSTGRES_USER: circleci
POSTGRES_DB: circleci
@ -15,6 +15,7 @@ jobs:
- run:
name: Wait for db
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run: sudo apt-get update
- run: sudo apt-get install -y postgresql-client
- run:
name: create postgres user

2
.gitignore vendored
View File

@ -43,3 +43,5 @@ docs/site
scratch
poetry.lock
pip-wheel-metadata
.DS_Store

View File

@ -13,7 +13,7 @@ homepage = "https://migra.djrobstep.com/"
python = "*"
sqlbag = "*"
six = "*"
schemainspect = ">= 0.1.1552209928"
schemainspect = ">=0.1.1575949847"
psycopg2-binary = { version="*", optional = true }
[tool.poetry.dev-dependencies]
@ -24,7 +24,7 @@ pytest-sugar = "*"
psycopg2-binary = "*"
flake8 = "*"
isort = "*"
black = {python=">3.6", version=">=18.9b0", allow_prereleases=true}
black = { version = ">=19.10b0", python=">=3.6" }
[tool.poetry.scripts]
migra = 'migra:do_command'

View File

@ -1,8 +1,8 @@
create schema if not exists "evenbetterschema";
create extension if not exists "citext" with schema "public" version '1.5';
create extension if not exists "citext" with schema "public" version '1.6';
create extension if not exists "hstore" with schema "public" version '1.5';
create extension if not exists "hstore" with schema "public" version '1.6';
create type "public"."bug_status" as enum ('new', 'open', 'closed');
@ -10,7 +10,7 @@ create sequence "public"."bug_id_seq";
create sequence "public"."products_product_no_seq";
revoke select on table "public"."products" from postgres;
revoke select on table "public"."products" from "postgres";
alter table "public"."products" drop constraint "products_name_key";
@ -166,6 +166,6 @@ alter table "public"."products" add constraint "y" CHECK ((price > (0)::numeric)
alter table "public"."products" add constraint "x" CHECK ((price > (10)::numeric));
grant update on table "public"."products" to postgres;
grant update on table "public"."products" to "postgres";
drop schema if exists "badschema";

View File

@ -1,8 +1,8 @@
create schema if not exists "evenbetterschema";
create extension if not exists "citext" with schema "public" version '1.5';
create extension if not exists "citext" with schema "public" version '1.6';
create extension if not exists "hstore" with schema "public" version '1.5';
create extension if not exists "hstore" with schema "public" version '1.6';
create type "public"."bug_status" as enum ('new', 'open', 'closed');
@ -10,7 +10,7 @@ create sequence "public"."bug_id_seq";
create sequence "public"."products_product_no_seq";
revoke select on table "public"."products" from postgres;
revoke select on table "public"."products" from "postgres";
alter table "public"."products" drop constraint "products_name_key";
@ -162,6 +162,6 @@ alter table "public"."products" add constraint "y" CHECK ((price > (0)::numeric)
alter table "public"."products" add constraint "x" CHECK ((price > (10)::numeric));
grant update on table "public"."products" to postgres;
grant update on table "public"."products" to "postgres";
drop schema if exists "badschema";

View File

@ -1,5 +1,5 @@
revoke select on table "public"."any_table" from postgres;
revoke select on table "public"."any_table" from "postgres";
drop view if exists "public"."any_other_view";
grant update on table "public"."any_table" to postgres;
grant update on table "public"."any_table" to "postgres";

View File

@ -1,5 +1,5 @@
revoke delete on table "public"."any_table" from postgres;
revoke delete on table "public"."any_table" from "postgres";
drop view if exists "public"."any_other_view";
grant update on table "public"."any_table" to postgres;
grant update on table "public"."any_table" to "postgres";

View File

@ -7,4 +7,4 @@ on "public"."accounts"
as restrictive
for all
to schemainspect_test_role
using (manager = (CURRENT_USER)::text);
using (manager = CURRENT_USER);

View File

@ -1 +1 @@
create extension if not exists "citext" with schema "public" version '1.5';
create extension if not exists "citext" with schema "public" version '1.6';

View File

@ -2,6 +2,6 @@ drop trigger if exists "emp_stamp_drop" on "public"."emp";
drop trigger if exists "emp_stamp" on "public"."emp";
CREATE TRIGGER emp_stamp_create BEFORE INSERT OR UPDATE ON public.emp FOR EACH ROW EXECUTE PROCEDURE emp_stamp();
CREATE TRIGGER emp_stamp_create BEFORE INSERT OR UPDATE ON public.emp FOR EACH ROW EXECUTE FUNCTION emp_stamp();
CREATE TRIGGER emp_stamp BEFORE UPDATE ON public.emp FOR EACH ROW EXECUTE PROCEDURE emp_stamp();
CREATE TRIGGER emp_stamp BEFORE UPDATE ON public.emp FOR EACH ROW EXECUTE FUNCTION emp_stamp();