Return JSON natively from Postgres in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE author ( | |
id INTEGER NOT NULL, | |
name VARCHAR(255) NOT NULL, | |
PRIMARY KEY (id) | |
); | |
CREATE TABLE book ( | |
id INTEGER NOT NULL, | |
name VARCHAR(255) NOT NULL, | |
author_id INTEGER, | |
PRIMARY KEY (id), | |
FOREIGN KEY(author_id) REFERENCES author (id) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment