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