-
Notifications
You must be signed in to change notification settings - Fork 3
/
yugabytedb-init.sql
31 lines (31 loc) · 1.51 KB
/
yugabytedb-init.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
create database lbcat;
\c lbcat;
DROP TABLE IF EXISTS authors;
CREATE TABLE authors (
id SERIAL,
first_name VARCHAR (50) NOT NULL,
last_name VARCHAR (50) NOT NULL,
email VARCHAR (100) NOT NULL,
birthdate date NOT NULL,
added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
INSERT INTO authors VALUES ('1','Eileen','Lubowitz','[email protected]','1991-03-04','2004-05-30 02:08:25'),
('2','Tamia','Mayert','[email protected]','2016-03-27','2014-03-21 02:52:00'),
('3','Cyril','Funk','[email protected]','1988-04-21','2011-06-24 18:17:48'),
('4','Nicolas','Buckridge','[email protected]','2017-02-03','2019-04-22 02:04:41'),
('5','Jayden','Walter','[email protected]','2010-02-27','1990-02-04 02:32:00');
DROP TABLE IF EXISTS posts;
CREATE TABLE posts (
id SERIAL,
author_id INT NOT NULL,
title VARCHAR (255) NOT NULL,
description VARCHAR (500) NOT NULL,
content text NOT NULL,
inserted_date date
);
INSERT INTO posts VALUES ('1','1','temporibus','voluptatum','Fugit non et doloribus repudiandae.','2015-11-18'),
('2','2','ea','aut','Tempora molestias maiores provident molestiae sint possimus quasi.','1975-06-08'),
('3','3','illum','rerum','Delectus recusandae sit officiis dolor.','1975-02-25'),
('4','4','itaque','deleniti','Magni nam optio id recusandae.','2010-07-28'),
('5','5','ad','similique','Rerum tempore quis ut nesciunt qui excepturi est.','2006-10-09');