mirror of
https://github.com/djrobstep/migra.git
synced 2024-09-11 13:56:05 +03:00
parent
f823fdc036
commit
2ba2f3209c
@ -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
2
.gitignore
vendored
@ -43,3 +43,5 @@ docs/site
|
||||
|
||||
scratch
|
||||
poetry.lock
|
||||
pip-wheel-metadata
|
||||
.DS_Store
|
||||
|
@ -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'
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -7,4 +7,4 @@ on "public"."accounts"
|
||||
as restrictive
|
||||
for all
|
||||
to schemainspect_test_role
|
||||
using (manager = (CURRENT_USER)::text);
|
||||
using (manager = CURRENT_USER);
|
||||
|
@ -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';
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user