Project

General

Profile

DB Migration Process » History » Version 5

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