Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
online-edu
online-edu-backend
Commits
59df2705
Commit
59df2705
authored
Jul 09, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理SQL脚本
parent
3e38fc40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
0 additions
and
134 deletions
+0
-134
V1.0.0__init.sql
src/main/resources/db/migration/V1.0.0__init.sql
+0
-0
V1.0.10__update.sql
src/main/resources/db/migration/V1.0.10__update.sql
+0
-7
V1.0.11__update.sql
src/main/resources/db/migration/V1.0.11__update.sql
+0
-3
V1.0.12__update.sql
src/main/resources/db/migration/V1.0.12__update.sql
+0
-4
V1.0.13__update.sql
src/main/resources/db/migration/V1.0.13__update.sql
+0
-3
V1.0.14__update.sql
src/main/resources/db/migration/V1.0.14__update.sql
+0
-3
V1.0.15__update.sql
src/main/resources/db/migration/V1.0.15__update.sql
+0
-25
V1.0.16__update.sql
src/main/resources/db/migration/V1.0.16__update.sql
+0
-3
V1.0.1__update.sql
src/main/resources/db/migration/V1.0.1__update.sql
+0
-10
V1.0.2__update.sql
src/main/resources/db/migration/V1.0.2__update.sql
+0
-3
V1.0.3__update.sql
src/main/resources/db/migration/V1.0.3__update.sql
+0
-3
V1.0.4__update.sql
src/main/resources/db/migration/V1.0.4__update.sql
+0
-3
V1.0.5__update.sql
src/main/resources/db/migration/V1.0.5__update.sql
+0
-3
V1.0.6__update.sql
src/main/resources/db/migration/V1.0.6__update.sql
+0
-18
V1.0.7__update.sql
src/main/resources/db/migration/V1.0.7__update.sql
+0
-38
V1.0.8__update.sql
src/main/resources/db/migration/V1.0.8__update.sql
+0
-3
V1.0.9__update.sql
src/main/resources/db/migration/V1.0.9__update.sql
+0
-5
No files found.
src/main/resources/db/migration/V1.0.0__init.sql
View file @
59df2705
This diff is collapsed.
Click to expand it.
src/main/resources/db/migration/V1.0.10__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`org_surplus`
MODIFY
COLUMN
`product_type`
varchar
(
50
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'产品类型'
AFTER
`course_id`
;
ALTER
TABLE
`org_user_receive_record`
MODIFY
COLUMN
`product_type`
varchar
(
50
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'产品类型'
AFTER
`user_id`
;
ALTER
TABLE
`product_order`
MODIFY
COLUMN
`product_type`
varchar
(
50
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'产品类型(个人包月、企业包月、付费点播)'
AFTER
`org_id`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.11__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course_consume_record`
ADD
COLUMN
`is_del`
tinyint
(
1
)
NULL
AFTER
`update_time`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.12__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course_consume_record`
MODIFY
COLUMN
`watch_time`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'本次观看时长(秒)'
AFTER
`user_id`
,
ADD
COLUMN
`video_time`
bigint
(
20
)
NULL
COMMENT
'观看到视频的时间'
AFTER
`watch_time`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.13__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course_consume_record`
MODIFY
COLUMN
`is_del`
tinyint
(
1
)
NULL
DEFAULT
0
AFTER
`update_time`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.14__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`product_order`
ADD
COLUMN
`source`
varchar
(
20
)
NULL
COMMENT
'支付来源'
AFTER
`pay_method`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.15__update.sql
deleted
100644 → 0
View file @
3e38fc40
CREATE
TABLE
`question`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`user_id`
bigint
(
20
)
NULL
COMMENT
'用户ID'
,
`course_id`
bigint
(
20
)
NULL
COMMENT
'课程ID'
,
`chapter_id`
bigint
(
20
)
NULL
COMMENT
'章节ID'
,
`content`
text
NULL
COMMENT
'问题内容'
,
`create_time`
datetime
(
0
)
NULL
,
`update_time`
datetime
(
0
)
NULL
,
`status`
VARCHAR
(
20
)
NULL
COMMENT
'状态:待回复、已回复、已完成'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'用户问题表'
;
CREATE
TABLE
`answer`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`question_id`
bigint
(
20
)
NULL
COMMENT
'问题ID'
,
`user_id`
bigint
(
20
)
NULL
COMMENT
'回复人ID'
,
`type`
VARCHAR
(
20
)
NULL
COMMENT
'区分讲师回复还是用户回复'
,
`content`
text
NULL
COMMENT
'内容'
,
`create_time`
datetime
(
0
)
NULL
,
`update_time`
datetime
(
0
)
NULL
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'问题回答表'
;
ALTER
TABLE
`teacher`
ADD
COLUMN
`account`
varchar
(
20
)
NULL
COMMENT
'讲师帐号'
AFTER
`avatar_url`
;
INSERT
INTO
`sys_role`
VALUES
(
6
,
'TEACHER'
,
'讲师'
,
'2021-04-25 16:10:06'
,
'2021-04-25 16:10:06'
);
src/main/resources/db/migration/V1.0.16__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`question`
MODIFY
COLUMN
`status`
int
(
1
)
NULL
DEFAULT
NULL
COMMENT
'状态:待回复、已回复、已完成'
AFTER
`update_time`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.1__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course`
ADD
COLUMN
`detail`
text
NULL
COMMENT
'课程介绍'
AFTER
`introduce`
;
CREATE
TABLE
`course_attachment`
(
`id`
bigint
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`course_id`
bigint
(
11
)
NOT
NULL
COMMENT
'课程ID'
,
`resource_id`
bigint
(
11
)
NOT
NULL
COMMENT
'资源ID'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'课程附件'
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.2__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`resource`
CHANGE
COLUMN
`bucket`
`video_id`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'阿里云视频ID'
AFTER
`name`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.3__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course_chapter`
ADD
COLUMN
`sort_no`
int
(
11
)
NULL
COMMENT
'序号'
AFTER
`name`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.4__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`swiper_config`
ADD
COLUMN
`status`
varchar
(
10
)
NULL
COMMENT
'状态(上架、下架)'
AFTER
`update_time`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.5__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course_tag`
ADD
COLUMN
`recommend`
tinyint
(
1
)
NULL
DEFAULT
0
COMMENT
'首页推荐'
AFTER
`update_time`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.6__update.sql
deleted
100644 → 0
View file @
3e38fc40
CREATE
TABLE
`product_order`
(
`id`
bigint
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`order_no`
varchar
(
32
)
NULL
COMMENT
'订单编号'
,
`order_name`
varchar
(
255
)
NULL
COMMENT
'订单名称'
,
`user_id`
bigint
(
11
)
NULL
COMMENT
'用户ID'
,
`product_type`
varchar
(
20
)
NULL
COMMENT
'产品类型(个人包月、企业包月、付费点播)'
,
`course_id`
bigint
(
11
)
NULL
COMMENT
'课程ID'
,
`product_price`
decimal
(
8
,
2
)
NULL
COMMENT
'产品单价'
,
`product_count`
int
(
11
)
NULL
COMMENT
'产品购买数量'
,
`order_money`
decimal
(
8
,
2
)
NULL
COMMENT
'订单金额'
,
`payment_money`
decimal
(
8
,
2
)
NULL
COMMENT
'支付金额'
,
`pay_method`
varchar
(
20
)
NULL
COMMENT
'支付方式(微信、支付宝)'
,
`status`
varchar
(
20
)
NULL
COMMENT
'订单状态'
,
`create_time`
datetime
(
0
)
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
(
0
)
NULL
COMMENT
'修改时间'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'产品订单'
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.7__update.sql
deleted
100644 → 0
View file @
3e38fc40
DROP
TABLE
IF
EXISTS
org_buy_course_record
;
DROP
TABLE
IF
EXISTS
org_buy_vip_record
;
DROP
TABLE
IF
EXISTS
user_get_vip_record
;
ALTER
TABLE
`organization`
ADD
COLUMN
`vip_receive`
varchar
(
10
)
NULL
COMMENT
'企业会员领取开放、关闭标识'
AFTER
`is_del`
,
ADD
COLUMN
`course_receive`
varchar
(
10
)
NULL
COMMENT
'企业会员点播库领取开放、关闭标识'
AFTER
`vip_receive`
;
CREATE
TABLE
`user_course_auth`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`user_id`
bigint
(
20
)
NULL
COMMENT
'用户ID'
,
`course_id`
bigint
(
20
)
NULL
COMMENT
'课程ID'
,
`start_time`
datetime
(
0
)
NULL
COMMENT
'开始时间'
,
`end_time`
datetime
(
0
)
NULL
COMMENT
'结束时间'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'用户课程授权表'
;
CREATE
TABLE
`org_surplus`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`org_id`
bigint
(
20
)
NULL
COMMENT
'企业ID'
,
`course_id`
bigint
(
20
)
NULL
COMMENT
'课程ID'
,
`product_type`
varchar
(
20
)
NULL
COMMENT
'产品类型'
,
`count`
int
(
11
)
NULL
COMMENT
'剩余数量'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'企业VIP或课程余额表'
;
CREATE
TABLE
`org_user_receive_record`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`org_id`
bigint
(
20
)
NULL
COMMENT
'企业ID'
,
`user_id`
bigint
(
20
)
NULL
COMMENT
'用户ID'
,
`product_type`
varchar
(
20
)
NULL
COMMENT
'产品类型'
,
`count`
int
(
11
)
NULL
COMMENT
'领用或分配的数量'
,
`course_id`
bigint
(
11
)
NULL
COMMENT
'课程ID'
,
`create_time`
datetime
(
0
)
NULL
,
`update_time`
datetime
(
0
)
NULL
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
=
'企业成员领用或分配记录表'
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.8__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`product_order`
ADD
COLUMN
`org_id`
bigint
(
20
)
NULL
AFTER
`user_id`
;
\ No newline at end of file
src/main/resources/db/migration/V1.0.9__update.sql
deleted
100644 → 0
View file @
3e38fc40
ALTER
TABLE
`course_consume_record`
DROP
COLUMN
`video_id`
,
MODIFY
COLUMN
`id`
varchar
(
36
)
NOT
NULL
COMMENT
'主键'
FIRST
,
MODIFY
COLUMN
`watch_time`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'观看时长(秒)'
AFTER
`user_id`
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment