DB Migration Process » History » Version 8
Amber Herold, 02/02/2010 11:04 AM
1 | 1 | Amber Herold | h1. DB Migration Process |
---|---|---|---|
2 | |||
3 | 3 | Amber Herold | The tables that will be affected are in the dbemdata database and the project database. |
4 | Migrate the user data from project to dbemdata because dbemdata is already in Sinedon format. |
||
5 | 4 | Amber Herold | |
6 | 5 | Amber Herold | |
7 | 1 | Amber Herold | +dbemdata+ |
8 | |||
9 | * GroupData |
||
10 | * UserData |
||
11 | |||
12 | +project+ |
||
13 | |||
14 | * users |
||
15 | * login |
||
16 | * pis |
||
17 | * userdetails |
||
18 | * projectowner |
||
19 | 5 | Amber Herold | |
20 | 6 | Amber Herold | Future: |
21 | 5 | Amber Herold | Eventually, we would like to have 3 databases, appion, leginon and project. The user related tables in dbemdata would be moved to project. |
22 | All the tables in project still need to be converted to Sinedon format. |
||
23 | 2 | Amber Herold | |
24 | h2. 1 Add new columns to UserData |
||
25 | |||
26 | Add: |
||
27 | |||
28 | * username |
||
29 | * fullname |
||
30 | * firstname |
||
31 | * lastname |
||
32 | * password |
||
33 | |||
34 | |||
35 | Leave the existing columns as is. Use of "name" and "full name" (with a space) will be phased out. |
||
36 | 1 | Amber Herold | |
37 | 3 | Amber Herold | h2. 2 Copy data to the UserData table |
38 | |||
39 | From users, copy username, firstname, lastname to UserData. |
||
40 | From login, copy password to UserData. |
||
41 | From userdetails, copy email to UserData. |
||
42 | |||
43 | h2. 3 Create projectowner table |
||
44 | |||
45 | Move the data from pis table to a new projectowner table in the project database. This table will refer to users in the UserData table. |
||
46 | We will phase out use of the pis table. |
||
47 | |||
48 | 8 | Amber Herold | h2. 5 Modify userdetails table |
49 | 3 | Amber Herold | |
50 | Remove the email column from the userdetails table. |
||
51 | 2 | Amber Herold |