-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e71add
commit 01be674
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
DROP TABLE IF EXISTS urls CASCADE; | ||
|
||
CREATE TABLE urls ( | ||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | ||
id SERIAL, | ||
name VARCHAR(255) NOT NULL, | ||
created_at TIMESTAMP NOT NULL | ||
created_at TIMESTAMP NOT NULL, | ||
CONSTRAINT pk_urls PRIMARY KEY (id) | ||
); | ||
|
||
DROP TABLE IF EXISTS url_checks; | ||
CREATE TABLE url_checks ( | ||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | ||
id SERIAL, | ||
url_id BIGINT REFERENCES urls (id) NOT NULL, | ||
status_code BIGINT, | ||
h1 VARCHAR(255), | ||
title VARCHAR(255), | ||
description TEXT, | ||
created_at TIMESTAMP NOT NULL | ||
created_at TIMESTAMP NOT NULL, | ||
CONSTRAINT pk_url_checks PRIMARY KEY (id) | ||
) |