Skip to content

Commit

Permalink
Update schema.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
NastasiyaT committed Oct 22, 2023
1 parent 9e71add commit 01be674
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/src/main/resources/schema.sql
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)
)

0 comments on commit 01be674

Please sign in to comment.