You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
295 B
12 lines
295 B
create table authors (
|
|
id SERIAL PRIMARY KEY,
|
|
name VARCHAR(15) NOT NULL
|
|
);
|
|
|
|
create table books (
|
|
id SERIAL PRIMARY KEY,
|
|
title VARCHAR(50) NOT NULL,
|
|
author_id INTEGER NOT NULL,
|
|
FOREIGN KEY(author_id) REFERENCES authors(id),
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
|
|
);
|