-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser doesn't work for a simple table #4
Comments
Hmm.. If I run
and converting it to an image: So I am puzzled as to why it wouldn't work for you. BTW ... I was using python 2 though. |
I tried it in python 3.7.0 .. works there too. |
Well, maybe 3.6 doesn't work... Also, how could you use python 2 with the |
Broken for me, too - I generated a schema-only dump of a PostgreSQL database, ran it as suggested, and got just the following output: /*
* Graphviz of './schema.sql', created 2018-09-05 11:15:18.872147
* Generated from https://github.com/rm-hull/sql_graphviz
*/
digraph g { graph [ rankdir = "LR" ];
} Relevant versions of things:
|
@duncan-bayne Could you post the postgres dump you were using please? |
I'm also unable to get any output in the dot file. Here's the dump file contents: --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.9
-- Dumped by pg_dump version 11.1 (Ubuntu 11.1-3.pgdg18.04+1)
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 client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: app_disclosure_templates; Type: TABLE; Schema: public
--
CREATE TABLE public.app_disclosure_templates (
id bigint NOT NULL,
inserted_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
linked_template_id bigint,
name character varying(255),
kind character varying(255),
de_simple_template_id character varying(255),
library_id integer,
shared boolean DEFAULT true,
active boolean DEFAULT true,
unpublished_changes boolean,
processing_status character varying(255) DEFAULT 'complete'::character varying,
legacy_id integer,
jurisdiction_state character varying(255) DEFAULT 'ALL'::character varying,
jurisdiction character varying(255),
type character varying(255) DEFAULT 'Disclosure'::character varying NOT NULL,
mime_type character varying(255) DEFAULT 'application/pdf'::character varying NOT NULL,
signature_type character varying(255) DEFAULT 'name'::character varying,
signature_text character varying(255),
owner_name character varying(255),
use_raw_editor boolean DEFAULT false,
override_billing_plan boolean DEFAULT false,
platform character varying(255) DEFAULT 'qlp'::character varying
);
--
-- PostgreSQL database dump complete
-- Command used for testing:
Dot file contents:
I'm on an Ubuntu-based system.
Looking forward to using it. :) |
@brainlid - so it turns out there are two causes why it wasn't able to parse your SQL (not the fault of pg_dump of course, but sql_graphviz)
So I've fixed those small snags, and your sample sql now renders as follows: I'll make a commit and push shortly... |
Awesome! Thanks! |
@rm-hull Your fix worked for my issue reported here. 👍 |
returns
Command used is
python sql_graphviz.py simple.sql
, and my python version isPython 3.6.5 :: Anaconda, Inc.
The text was updated successfully, but these errors were encountered: