forked from benedmunds/CodeIgniter-Ion-Auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmigrate.postgre.sql
41 lines (33 loc) · 927 Bytes
/
migrate.postgre.sql
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
/*
* Activation feature upgrade
*/
ALTER TABLE "users"
ADD COLUMN "activation_selector" varchar(255),
ALTER COLUMN "activation_code" TYPE varchar(255);
/*
* Remember_me feature upgrade
*/
ALTER TABLE "users"
ADD COLUMN "remember_selector" varchar(255),
ALTER COLUMN "remember_code" TYPE varchar(255);
/*
* Forgotten password feature upgrade
*/
ALTER TABLE "users"
ADD COLUMN "forgotten_password_selector" varchar(255),
ALTER COLUMN "forgotten_password_code" TYPE varchar(255);
/*
* Add optimization
*/
ALTER TABLE "users"
ADD CONSTRAINT "uc_email"
UNIQUE ("email");
ALTER TABLE "users"
ADD CONSTRAINT "uc_activation_selector"
UNIQUE ("activation_selector");
ALTER TABLE "users"
ADD CONSTRAINT "uc_remember_selector"
UNIQUE ("remember_selector");
ALTER TABLE "users"
ADD CONSTRAINT "uc_forgotten_password_selector"
UNIQUE ("forgotten_password_selector");