Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ENV GO111MODULE=on \
WORKDIR /app

COPY ./server ./server
COPY ./middleware ./middleware
COPY go.mod .
COPY go.sum .

Expand All @@ -28,3 +29,4 @@ COPY .env .
EXPOSE 22250

ENTRYPOINT ["/bin/sh", "-c" , "./build/server"]

95 changes: 47 additions & 48 deletions db/init_db.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
CREATE TABLE Users (
user_id INT NOT NULL AUTO_INCREMENT,
user_name VARCHAR(10) NOT NULL,
PRIMARY KEY (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;


-- dep.ADMIN definition
CREATE TABLE ADMIN (
id INT NOT NULL AUTO_INCREMENT,
Expand All @@ -9,62 +16,54 @@ CREATE TABLE ADMIN (
UNIQUE KEY ADMIN_unique (email)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO ADMIN (email,passcode,admin_type,brand_id) VALUES
('[email protected]','$2a$12$cqXwxUhyP5bkcdoz7Tge1.6DgDeN9h4mqfTqMycCdm01K8rsKwbVG','SUPER',NULL);
-- -- INSERT INTO ADMIN (email,passcode,admin_type,brand_id) VALUES
-- -- ('[email protected]','$2a$12$cqXwxUhyP5bkcdoz7Tge1.6DgDeN9h4mqfTqMycCdm01K8rsKwbVG','SUPER',NULL);

CREATE TABLE Users (
user_id SERIAL PRIMARY KEY, --SERIAL: 자동으로 증가하는 정수 타입
--password_hash VARCHAR(255) NOT NULL,
user_name VARCHAR(10) NOT NULL,
--preferences JSONB
);

CREATE TABLE Categories (
categories_id SERIAL PRIMARY KEY,
user_id INT REFERENCES Users(user_id),
id INT NOT NULL AUTO_INCREMENT,
user_email VARCHAR(20),
color VARCHAR(7),
--start_time TIMESTAMP NOT NULL,
--end_time TIMESTAMP NOT NULL,
categories_title VARCHAR(20) NOT NULL,
categories_total_time INT NOT NULL DEFAULT 0,
);
title VARCHAR(20) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

CREATE TABLE Blocks (
block_id SERIAL PRIMARY KEY,
start_time TIMESTAMP NOT NULL,
end_time TIMESTAMP NOT NULL,
duration time.Duration NOT NULL,
color VARCHAR(7) REFERENCES Categories(categories_id) ON DELETE CASCADE ON UPDATE NO ACTION,
background_image_url TEXT,
block_memo TEXT,
block_pin BOOLEAN NOT NULL,
);
-- CREATE TABLE Blocks (
-- block_id SERIAL PRIMARY KEY,
-- start_time TIMESTAMP NOT NULL,
-- end_time TIMESTAMP NOT NULL,
-- duration time.Duration NOT NULL,
-- color VARCHAR(7) REFERENCES Categories(categories_id) ON DELETE CASCADE ON UPDATE NO ACTION,
-- background_image_url TEXT,
-- block_memo TEXT,
-- block_pin BOOLEAN NOT NULL
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;


-- CREATE TABLE CategoriesBlocks (
-- categories_id INT REFERENCES categories(categories_id),
-- block_id INT REFERENCES Blocks(block_id),
-- PRIMARY KEY(categories_id, block_id)
-- );
-- -- CREATE TABLE CategoriesBlocks (
-- -- categories_id INT REFERENCES categories(categories_id),
-- -- block_id INT REFERENCES Blocks(block_id),
-- -- PRIMARY KEY(categories_id, block_id)
-- -- );

/* CREATE TABLE Tags (
tag_id SERIAL PRIMARY KEY,
tag_name VARCHAR(100) UNIQUE NOT NULL
);--? */
-- /* CREATE TABLE Tags (
-- tag_id SERIAL PRIMARY KEY,
-- tag_name VARCHAR(100) UNIQUE NOT NULL
-- );--? */

/* CREATE TABLE CategoriesTags (
categories_id INT REFERENCES categories(categories_id),
tag_id INT REFERENCES Tags(tag_id),
PRIMARY KEY(categories_id, tag_id)
); */
-- /* CREATE TABLE CategoriesTags (
-- categories_id INT REFERENCES categories(categories_id),
-- tag_id INT REFERENCES Tags(tag_id),
-- PRIMARY KEY(categories_id, tag_id)
-- ); */

CREATE TABLE Calendar (
date DATE PRIMARY KEY,
representative_block_id INT REFERENCES Blocks(block_id),
);
-- CREATE TABLE Calendar (
-- date DATE PRIMARY KEY,
-- representative_block_id INT REFERENCES Blocks(block_id)
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- CREATE TABLE CalendarBlocks (
-- date DATE REFERENCES Calendar(date),
-- block_id INT REFERENCES Blocks(block_id),
-- PRIMARY KEY(date, block_id)
-- );
-- -- CREATE TABLE CalendarBlocks (
-- -- date DATE REFERENCES Calendar(date),
-- -- block_id INT REFERENCES Blocks(block_id),
-- -- PRIMARY KEY(date, block_id)
-- -- );
Binary file added db/mysql/aria_log.00000001
Binary file not shown.
Binary file added db/mysql/aria_log_control
Binary file not shown.
Binary file added db/mysql/ddl_recovery-backup.log
Binary file not shown.
170 changes: 170 additions & 0 deletions db/mysql/ib_buffer_pool
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
7,3
7,2
7,1
7,0
6,4
6,3
6,2
6,1
6,0
5,3
5,2
5,1
5,0
4,3
2,3
1,3
0,243
0,9
0,0
0,1
0,300
0,299
0,298
0,297
0,296
0,295
0,294
0,293
0,292
0,291
0,290
0,289
0,288
0,287
0,286
0,285
0,284
0,283
0,282
0,281
0,280
0,279
0,278
0,277
0,276
0,275
0,274
0,273
0,272
0,271
0,270
0,269
0,268
0,267
0,266
0,265
0,264
0,263
0,262
0,261
0,260
0,259
0,258
0,257
0,256
0,255
0,254
0,253
0,252
0,251
0,250
0,249
0,248
0,247
0,246
0,245
0,244
0,242
0,241
0,240
0,239
0,238
0,237
0,236
0,235
0,234
0,233
0,232
0,231
0,230
0,229
0,228
0,227
0,226
0,225
0,224
0,223
0,222
0,221
0,220
0,219
0,218
0,217
0,216
0,215
0,214
0,213
0,212
0,211
0,210
0,209
0,208
0,207
0,206
0,205
0,204
0,203
0,202
0,201
0,200
0,199
0,198
0,197
0,196
0,195
0,194
0,193
0,192
0,63
0,62
0,61
0,60
0,59
0,58
0,57
0,56
0,55
0,54
0,53
0,52
0,313
0,51
0,312
0,50
0,311
0,49
0,310
0,48
0,309
0,47
0,308
0,46
0,307
0,45
0,301
0,6
0,5
0,304
0,303
0,306
0,305
0,302
0,12
0,10
0,8
0,11
0,4
0,2
0,3
0,7
Binary file added db/mysql/ib_logfile0
Binary file not shown.
Binary file added db/mysql/ibdata1
Binary file not shown.
Empty file added db/mysql/multi-master.info
Empty file.
Binary file added db/mysql/mysql/column_stats.MAD
Binary file not shown.
Binary file added db/mysql/mysql/column_stats.MAI
Binary file not shown.
Binary file added db/mysql/mysql/column_stats.frm
Binary file not shown.
Binary file added db/mysql/mysql/columns_priv.MAD
Binary file not shown.
Binary file added db/mysql/mysql/columns_priv.MAI
Binary file not shown.
Binary file added db/mysql/mysql/columns_priv.frm
Binary file not shown.
Binary file added db/mysql/mysql/db.MAD
Binary file not shown.
Binary file added db/mysql/mysql/db.MAI
Binary file not shown.
Binary file added db/mysql/mysql/db.frm
Binary file not shown.
2 changes: 2 additions & 0 deletions db/mysql/mysql/db.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default-character-set=utf8mb3
default-collation=utf8mb3_unicode_ci
Binary file added db/mysql/mysql/event.MAD
Binary file not shown.
Binary file added db/mysql/mysql/event.MAI
Binary file not shown.
Binary file added db/mysql/mysql/event.frm
Binary file not shown.
Binary file added db/mysql/mysql/func.MAD
Binary file not shown.
Binary file added db/mysql/mysql/func.MAI
Binary file not shown.
Binary file added db/mysql/mysql/func.frm
Binary file not shown.
Binary file added db/mysql/mysql/general_log.CSM
Binary file not shown.
Empty file added db/mysql/mysql/general_log.CSV
Empty file.
Binary file added db/mysql/mysql/general_log.frm
Binary file not shown.
Binary file added db/mysql/mysql/global_priv.MAD
Binary file not shown.
Binary file added db/mysql/mysql/global_priv.MAI
Binary file not shown.
Binary file added db/mysql/mysql/global_priv.frm
Binary file not shown.
Binary file added db/mysql/mysql/gtid_slave_pos.frm
Binary file not shown.
Binary file added db/mysql/mysql/gtid_slave_pos.ibd
Binary file not shown.
Binary file added db/mysql/mysql/help_category.MAD
Binary file not shown.
Binary file added db/mysql/mysql/help_category.MAI
Binary file not shown.
Binary file added db/mysql/mysql/help_category.frm
Binary file not shown.
Binary file added db/mysql/mysql/help_keyword.MAD
Binary file not shown.
Binary file added db/mysql/mysql/help_keyword.MAI
Binary file not shown.
Binary file added db/mysql/mysql/help_keyword.frm
Binary file not shown.
Binary file added db/mysql/mysql/help_relation.MAD
Binary file not shown.
Binary file added db/mysql/mysql/help_relation.MAI
Binary file not shown.
Binary file added db/mysql/mysql/help_relation.frm
Binary file not shown.
Binary file added db/mysql/mysql/help_topic.MAD
Binary file not shown.
Binary file added db/mysql/mysql/help_topic.MAI
Binary file not shown.
Binary file added db/mysql/mysql/help_topic.frm
Binary file not shown.
Binary file added db/mysql/mysql/index_stats.MAD
Binary file not shown.
Binary file added db/mysql/mysql/index_stats.MAI
Binary file not shown.
Binary file added db/mysql/mysql/index_stats.frm
Binary file not shown.
Binary file added db/mysql/mysql/innodb_index_stats.frm
Binary file not shown.
Binary file added db/mysql/mysql/innodb_index_stats.ibd
Binary file not shown.
Binary file added db/mysql/mysql/innodb_table_stats.frm
Binary file not shown.
Binary file added db/mysql/mysql/innodb_table_stats.ibd
Binary file not shown.
Binary file added db/mysql/mysql/plugin.MAD
Binary file not shown.
Binary file added db/mysql/mysql/plugin.MAI
Binary file not shown.
Binary file added db/mysql/mysql/plugin.frm
Binary file not shown.
Binary file added db/mysql/mysql/proc.MAD
Binary file not shown.
Binary file added db/mysql/mysql/proc.MAI
Binary file not shown.
Binary file added db/mysql/mysql/proc.frm
Binary file not shown.
Binary file added db/mysql/mysql/procs_priv.MAD
Binary file not shown.
Binary file added db/mysql/mysql/procs_priv.MAI
Binary file not shown.
Binary file added db/mysql/mysql/procs_priv.frm
Binary file not shown.
Binary file added db/mysql/mysql/proxies_priv.MAD
Binary file not shown.
Binary file added db/mysql/mysql/proxies_priv.MAI
Binary file not shown.
Binary file added db/mysql/mysql/proxies_priv.frm
Binary file not shown.
Binary file added db/mysql/mysql/roles_mapping.MAD
Binary file not shown.
Binary file added db/mysql/mysql/roles_mapping.MAI
Binary file not shown.
Binary file added db/mysql/mysql/roles_mapping.frm
Binary file not shown.
Binary file added db/mysql/mysql/servers.MAD
Binary file not shown.
Binary file added db/mysql/mysql/servers.MAI
Binary file not shown.
Binary file added db/mysql/mysql/servers.frm
Binary file not shown.
Binary file added db/mysql/mysql/slow_log.CSM
Binary file not shown.
Empty file added db/mysql/mysql/slow_log.CSV
Empty file.
Binary file added db/mysql/mysql/slow_log.frm
Binary file not shown.
Binary file added db/mysql/mysql/table_stats.MAD
Binary file not shown.
Binary file added db/mysql/mysql/table_stats.MAI
Binary file not shown.
Binary file added db/mysql/mysql/table_stats.frm
Binary file not shown.
Binary file added db/mysql/mysql/tables_priv.MAD
Binary file not shown.
Binary file added db/mysql/mysql/tables_priv.MAI
Binary file not shown.
Binary file added db/mysql/mysql/tables_priv.frm
Binary file not shown.
Binary file added db/mysql/mysql/time_zone.MAD
Binary file not shown.
Binary file added db/mysql/mysql/time_zone.MAI
Binary file not shown.
Binary file added db/mysql/mysql/time_zone.frm
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_leap_second.MAD
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_leap_second.MAI
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_leap_second.frm
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_name.MAD
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_name.MAI
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_name.frm
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_transition.MAD
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_transition.MAI
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_transition.frm
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_transition_type.MAD
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_transition_type.MAI
Binary file not shown.
Binary file added db/mysql/mysql/time_zone_transition_type.frm
Binary file not shown.
Binary file added db/mysql/mysql/transaction_registry.frm
Binary file not shown.
Binary file added db/mysql/mysql/transaction_registry.ibd
Binary file not shown.
16 changes: 16 additions & 0 deletions db/mysql/mysql/user.frm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions db/mysql/mysql_upgrade_info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.6.7-MariaDB
2 changes: 2 additions & 0 deletions db/mysql/performance_schema/db.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default-character-set=utf8mb3
default-collation=utf8mb3_general_ci
2 changes: 2 additions & 0 deletions db/mysql/sys/db.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default-character-set=utf8mb3
default-collation=utf8mb3_general_ci
Loading