-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path旧的信息表数据迁移.txt
65 lines (48 loc) · 2.15 KB
/
旧的信息表数据迁移.txt
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
数据表信息迁移:
bid_id:
3 2013 - OW2国际开源竞赛 author:jack
5 2013 SCILAB Open Source Software Contest author:scilab
32 第五届NUDT信息安全竞赛精英级 author:龙军老师
############################################
bids-->contests (将bids中id为:3,5,32的记录(全部字段除了id)写入contests)
id --> id(以此写入现有竞赛的后面)
name --> name
budget --> budget
author_id --> author_id
deadline --> deadline
description --> description
created_on --> created_on
updatet_on --> updated_on
commit --> commit
password --> password
mysql:
INSERT INTO contests(name, budget, author_id, deadline, description, created_on, updated_on, commit, password)
SELECT name, budget, author_id, deadline, description, created_on, updated_on, commit, password FROM bids WHERE(id='3' AND id='5' AND id='32')
###########################################
biding_projects-->contesting_projects (将biding_projects中bid_id为3,5,32的记录(除了字段:id,)写入contesting_projects)
id --> id(以此写入现有项目的后面)
project_id --> project_id
bid_id --> contest_id
user_id --> user_id
description --> description
created_at --> created_at
updatet_at --> updated_at
reward --> reward
mysql:
INSERT INTO contesting_projects(project_id, contest_id, user_id, description, created_at, updated_at, reward)
SELECT project_id, bid_id, user_id, description, created_at, updated_at, reward FROM biding_projects WHERE(id='3' AND id='5' AND id='32')
########################################
xiangdong:
移植竞赛:
INSERT INTO contests (NAME, budget, author_id, deadline, description, created_on, updated_on, COMMIT, PASSWORD)
SELECT NAME, budget, author_id, deadline, description, created_on, updated_on, COMMIT, PASSWORD FROM bids
WHERE reward_type = 2
;
移植竞赛中的项目:
INSERT INTO `contests``contesting_projects` (project_id, contest_id, user_id, description, created_at, updated_at, reward)
SELECT project_id, bid_id, user_id, description, created_at, updated_at, reward FROM biding_projects
WHERE(bid_id IN (3,5,32) )
;
移植竞赛中的留言:
移植竞赛中的关注人员:
移植竞赛中的参与者: