Skip to content

Commit 898f406

Browse files
committed
feat: ddl 추가
1 parent 0d78544 commit 898f406

1 file changed

Lines changed: 36 additions & 1 deletion

File tree

aics-api/src/main/resources/db/schema.sql

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,39 @@ CREATE TABLE schedule
188188
created_at TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
189189
updated_at TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
190190
deleted_at TIMESTAMP(6) DEFAULT NULL
191-
);
191+
);
192+
193+
-- thesis
194+
create table thesis
195+
(
196+
id bigint generated by default as identity
197+
primary key,
198+
created_at timestamp(6) not null,
199+
deleted_at timestamp(6),
200+
updated_at timestamp(6) not null,
201+
approval boolean not null,
202+
schedule_id bigint not null,
203+
thesis_file_id bigint not null
204+
);
205+
206+
create index idx_schedule_id
207+
on thesis (schedule_id);
208+
209+
create index idx_thesis_schedule_id
210+
on thesis (schedule_id);
211+
212+
-- certificate
213+
create table certificate
214+
(
215+
id bigint generated by default as identity
216+
primary key,
217+
created_at timestamp(6) not null,
218+
deleted_at timestamp(6),
219+
updated_at timestamp(6) not null,
220+
approval boolean not null,
221+
certificate_file_id bigint not null,
222+
schedule_id bigint not null
223+
);
224+
225+
create index idx_certificate_schedule_id
226+
on certificate (schedule_id);

0 commit comments

Comments
 (0)