fordfrog / apgdiff

Another PostgreSQL Diff Tool
http://www.apgdiff.com
MIT License
355 stars 138 forks source link

inheritance #166

Closed hufersil closed 8 years ago

hufersil commented 9 years ago

when working with inherited tables, apgdiff is not able to parse.

--- ERROR: Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot find column 'codlog' in table 'log_alteracoes_20150601_0607_w23' at cz.startnet.utils.pgdiff.parsers.AlterTableParser.parseAlterColumn(AlterTableParser.java:266) at cz.startnet.utils.pgdiff.parsers.AlterTableParser.parse(AlterTableParser.java:79) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:180) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:236) at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:29) at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

--- Parent Table: CREATE TABLE log_alteracoes ( codlog integer NOT NULL, data_alteracao timestamp with time zone, nome_chave character varying(255) NOT NULL, valor_chave character varying(255) NOT NULL, tabela character varying(100) NOT NULL, tipo integer, codusr integer, valores_antigos hstore, valores_novos hstore );

--- Child Table: CREATE TABLE log_alteracoes_20150601_0607_w23 ( CONSTRAINT log_alteracoes_20150601_0607_w23_data_alteracao_check CHECK (((data_alteracao >= '2015-06-01 00:00:00-03'::timestamp with time zone) AND (data_alteracao <= '2015-06-07 23:59:59.999-03'::timestamp with time zone))) ) INHERITS (public.log_alteracoes);

avbasov commented 8 years ago

PR #117