pgquarrel supports the most important objects:
- tables;
- indexes;
- functions;
- views;
- materialized views;
- schemas;
- sequences;
- triggers;
- types;
- domains.
- extensions;
- rules;
- event triggers;
- text search;
- operators;
- security labels.
$ pgquarrel --source-dbname=dev --target-dbname=prod --source-host=192.168.0.8 --target-host=192.168.0.6 --function=false --comment=true
--
-- pgquarrel 0.4.0
-- quarrel between 9.1.24 and 10.4
--
CREATE DOMAIN public.cep AS text
CONSTRAINT cep_check CHECK ((VALUE ~ '^\d{5}-d{3}$'::text));
CREATE TABLE public.bar (
description character varying(30) NOT NULL,
foo_id integer,
id integer NOT NULL
);
ALTER TABLE ONLY public.bar
ADD CONSTRAINT bar_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.bar
ADD CONSTRAINT bar_foo_id_fkey FOREIGN KEY (foo_id) REFERENCES foo(id);
COMMENT ON TABLE public.bar IS 'this is another table';
COMMENT ON COLUMN public.bar.description IS 'this is a column';
ALTER TABLE ONLY public.foo DROP COLUMN removeit;
ALTER TABLE public.foo RESET (autovacuum_enabled);
--
-- pgquarrel 0.4.0
-- quarrel between 9.1.24 and 10.4
--
CREATE DOMAIN public.cep AS text
CONSTRAINT cep_check CHECK ((VALUE ~ '^\d{5}-d{3}$'::text));
CREATE TABLE public.bar (
description character varying(30) NOT NULL,
foo_id integer,
id integer NOT NULL
);
ALTER TABLE ONLY public.bar
ADD CONSTRAINT bar_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.bar
ADD CONSTRAINT bar_foo_id_fkey FOREIGN KEY (foo_id) REFERENCES foo(id);
COMMENT ON TABLE public.bar IS 'this is another table';
COMMENT ON COLUMN public.bar.description IS 'this is a column';
ALTER TABLE ONLY public.foo DROP COLUMN removeit;
ALTER TABLE public.foo RESET (autovacuum_enabled);
If you have any questions, suggestions or bugs, open an issue or send a pull request.
Thanks to Rafał Cieślak and Gilles Darold for their contributions.
No comments:
Post a Comment