Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.

Commit 35a6181

Browse files
author
irsol
committed
create table and insert test users
1 parent 99b483a commit 35a6181

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

server-template/init_db.sql

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
-- Initial setup of a database
22

3+
SET statement_timeout = 0;
4+
SET lock_timeout = 0;
5+
SET client_encoding = 'UTF8';
6+
SET standard_conforming_strings = on;
7+
SET check_function_bodies = false;
8+
SET client_min_messages = warning;
9+
10+
11+
SET search_path = public, pg_catalog;
12+
13+
SET default_tablespace = '';
14+
15+
SET default_with_oids = false;
16+
317
CREATE TABLE users (
4-
user_name TEXT,
18+
user_name TEXT NOT NULL,
19+
age integer NOT NULL,
520
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
621
id SERIAL
722
);
823

9-
CREATE INDEX ON users ((lower(user_name)));
24+
CREATE INDEX ON users ((lower(user_name)));
25+
26+
ALTER TABLE users OWNER TO vagrant;
27+
28+
INSERT INTO users VALUES ('Tom Cat', 33), ('Bead Eat', 44);

0 commit comments

Comments
 (0)