Skip to content

Commit

Permalink
git dir change
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsuyeondev committed May 25, 2024
1 parent 2e354c4 commit 86283a3
Show file tree
Hide file tree
Showing 24 changed files with 46 additions and 41 deletions.
Binary file added docker/db/mysql/data/#innodb_redo/#ib_redo10
Binary file not shown.
Binary file added docker/db/mysql/data/#innodb_redo/#ib_redo41_tmp
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000005
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000006
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000007
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000008
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000009
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000010
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000011
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000012
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000013
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000014
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000015
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000016
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000017
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000018
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000019
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000020
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000021
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000022
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000023
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000024
Binary file not shown.
Binary file added docker/db/mysql/data/binlog.000025
Binary file not shown.
87 changes: 46 additions & 41 deletions docker/db/mysql/init/init.sql
Original file line number Diff line number Diff line change
@@ -1,58 +1,63 @@
USE mysqldb;

-- Create database
CREATE DATABASE IF NOT EXISTS mysqldb;
-- Switch to the newly created database
USE mysqldb;

SELECT DATABASE();
select user();

CREATE TABLE MB_MEMBER(
member_id INT(11) NOT NULL AUTO_INCREMENT,
member_nm VARCHAR(30) NOT NULL,
cell_no VARCHAR(30) NOT NULL,
skin_type VARCHAR(20),
age varchar(3) NOT NULL,
entry_date DATETIME,
addr varchar(100),
addr_detail varchar(200),
CONSTRAINT MB_MEMBER_PK PRIMARY KEY(member_id)
CREATE TABLE IF NOT EXISTS mb_member(
member_id INT(11) NOT NULL AUTO_INCREMENT,
member_nm VARCHAR(30) NOT NULL,
cell_no VARCHAR(30) NOT NULL,
skin_type VARCHAR(20),
age varchar(3) NOT NULL,
entry_date DATETIME,
addr varchar(100),
addr_detail varchar(200),
CONSTRAINT MB_MEMBER_PK PRIMARY KEY(member_id)
);

select * from MB_MEMBER;

CREATE TABLE PV_GOODS(
goods_no INT NOT NULL AUTO_INCREMENT,
category VARCHAR(30) NOT NULL,
goods_nm VARCHAR(30) NOT NULL,
sale_price INT not null,
market_price INT not null,
supply_price INT not null,
vendor_id INT not null,
stock_qty INT not null,
brand_nm VARCHAR(20) not null,
image varchar(200),
add_image varchar(200),
sale_start_dtime DATETIME default now(),
sale_end_dtime DATETIME default (DATE_ADD(now(), INTERVAL 1 DAY) - INTERVAL 1 SECOND),
insert_dtime DATETIME default now(),
update_dtime DATETIME DEFAULT now(),
CONSTRAINT PV_GOODS_PK PRIMARY KEY(goods_no)
CREATE TABLE IF NOT EXISTS pv_goods(
goods_no INT NOT NULL AUTO_INCREMENT,
category VARCHAR(30) NOT NULL,
goods_nm VARCHAR(30) NOT NULL,
sale_price INT not null,
market_price INT not null,
supply_price INT not null,
vendor_id INT not null,
stock_qty INT not null,
brand_nm VARCHAR(20) not null,
image varchar(200),
add_image varchar(200),
sale_start_dtime DATETIME default now(),
sale_end_dtime DATETIME default (DATE_ADD(now(), INTERVAL 1 DAY) - INTERVAL 1 SECOND),
insert_dtime DATETIME default now(),
update_dtime DATETIME DEFAULT now(),
CONSTRAINT PV_GOODS_PK PRIMARY KEY(goods_no)
);

drop table pv_goods;
drop table PV_ITEM;
select (DATE_ADD(now(), INTERVAL 1 DAY) - INTERVAL 1 SECOND);

SELECT @@global.time_zone;

CREATE TABLE PV_ITEM(
item_no INT(11) NOT NULL AUTO_INCREMENT,
goods_no INT(11) NOT NULL,
item_nm VARCHAR(30) NOT NULL,
item_qty INT,
insert_dtime DATETIME default now(),
update_dtime DATETIME DEFAULT now(),
CONSTRAINT PV_ITEM_PK PRIMARY KEY(item_no),
foreign key (goods_no) references PV_GOODS(goods_no)
CREATE TABLE IF NOT EXISTS pv_item(
item_no INT(11) NOT NULL AUTO_INCREMENT,
goods_no INT(11) NOT NULL,
item_nm VARCHAR(30) NOT NULL,
item_qty INT,
insert_dtime DATETIME default now(),
update_dtime DATETIME DEFAULT now(),
CONSTRAINT PV_ITEM_PK PRIMARY KEY(item_no),
foreign key (goods_no) references PV_GOODS(goods_no)
);

commit;

select * from PV_GOODS;
select * from pv_goods;
select * from pv_item;
select * from pv_goods where goods_no =1;


0 comments on commit 86283a3

Please sign in to comment.