-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstruct.sql
231 lines (180 loc) · 7.4 KB
/
struct.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
-- -------------------------------------------------------------
-- TablePlus 6.2.1(578)
--
-- https://tableplus.com/
--
-- Database: neondb
-- Generation Time: 2025-02-05 22:29:21.9470
-- -------------------------------------------------------------
DROP TABLE IF EXISTS "public"."basic";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS basic_id_seq;
-- Table Definition
CREATE TABLE "public"."basic" (
"id" int4 NOT NULL DEFAULT nextval('basic_id_seq'::regclass),
"name" varchar(255),
"value" varchar(2048),
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."certificate";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS certificate_id_seq;
-- Table Definition
CREATE TABLE "public"."certificate" (
"id" int4 NOT NULL DEFAULT nextval('certificate_id_seq'::regclass),
"name" varchar(255),
"date" date,
"issuer" varchar(255),
"url" varchar(2048),
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."experience";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS work_id_seq;
-- Table Definition
CREATE TABLE "public"."experience" (
"id" int4 NOT NULL DEFAULT nextval('work_id_seq'::regclass),
"company" varchar(255) NOT NULL,
"position" varchar(255) NOT NULL,
"summary" varchar(2048) NOT NULL,
"type" varchar(255),
"contract" varchar(255),
"website" varchar(255),
"url" varchar(255),
"location" varchar(255),
"startDate" date NOT NULL,
"endDate" date,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."highlight";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS highlight_id_seq;
-- Table Definition
CREATE TABLE "public"."highlight" (
"id" int4 NOT NULL DEFAULT nextval('highlight_id_seq'::regclass),
"text" varchar(2048) NOT NULL,
"experience" int4,
"order" int4,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."interest";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS hobbies_id_seq;
-- Table Definition
CREATE TABLE "public"."interest" (
"id" int4 NOT NULL DEFAULT nextval('hobbies_id_seq'::regclass),
"name" varchar(255) NOT NULL,
"category" int4,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."interest_category";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS hobbie_category_id_seq;
-- Table Definition
CREATE TABLE "public"."interest_category" (
"id" int4 NOT NULL DEFAULT nextval('hobbie_category_id_seq'::regclass),
"name" varchar(255) NOT NULL,
"order" int4,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."language";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS language_id_seq;
-- Table Definition
CREATE TABLE "public"."language" (
"id" int4 NOT NULL DEFAULT nextval('language_id_seq'::regclass),
"name" varchar(255) NOT NULL,
"fluency" varchar(255) NOT NULL,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."picture";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS pictures_id_seq;
-- Table Definition
CREATE TABLE "public"."picture" (
"id" int4 NOT NULL DEFAULT nextval('pictures_id_seq'::regclass),
"file" bytea NOT NULL,
"type" varchar(255),
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."profile";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS profile_id_seq;
-- Table Definition
CREATE TABLE "public"."profile" (
"id" int4 NOT NULL DEFAULT nextval('profile_id_seq'::regclass),
"network" varchar(255) NOT NULL,
"username" varchar(255) NOT NULL,
"url" varchar(1024) NOT NULL,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."project";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS project_id_seq;
-- Table Definition
CREATE TABLE "public"."project" (
"id" int4 NOT NULL DEFAULT nextval('project_id_seq'::regclass),
"name" varchar(255),
"startDate" date,
"endDate" date,
"summary" varchar(2048),
"url" varchar(2048),
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."reference";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS reference_id_seq;
-- Table Definition
CREATE TABLE "public"."reference" (
"id" int4 NOT NULL DEFAULT nextval('reference_id_seq'::regclass),
"name" varchar(255),
"reference" varchar(2048),
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."skill";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS skill_id_seq;
-- Table Definition
CREATE TABLE "public"."skill" (
"id" int4 NOT NULL DEFAULT nextval('skill_id_seq'::regclass),
"name" varchar(255) NOT NULL,
"category" int4,
"order" int4,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "public"."skill_category";
-- This script only contains the table creation statements and does not fully represent the table in the database. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS skills_category_id_seq;
-- Table Definition
CREATE TABLE "public"."skill_category" (
"id" int4 NOT NULL DEFAULT nextval('skills_category_id_seq'::regclass),
"name" varchar(255) NOT NULL,
"order" int4,
PRIMARY KEY ("id")
);
-- Indices
CREATE UNIQUE INDEX work_pkey ON public.experience USING btree (id);
ALTER TABLE "public"."highlight" ADD FOREIGN KEY ("experience") REFERENCES "public"."experience"("id");
ALTER TABLE "public"."interest" ADD FOREIGN KEY ("category") REFERENCES "public"."interest_category"("id");
-- Indices
CREATE UNIQUE INDEX hobbies_pkey ON public.interest USING btree (id);
-- Indices
CREATE UNIQUE INDEX hobbie_category_pkey ON public.interest_category USING btree (id);
-- Indices
CREATE UNIQUE INDEX pictures_pkey ON public.picture USING btree (id);
ALTER TABLE "public"."skill" ADD FOREIGN KEY ("category") REFERENCES "public"."skill_category"("id");
-- Indices
CREATE UNIQUE INDEX skills_category_pkey ON public.skill_category USING btree (id);