2 - modify database table names.
4 rename USERS to SEC_USER;
5 rename table GROUPS to SEC_GROUP;
6 rename table USER_GROUPS to SEC_USER_GROUP;
8 - modify config of flexible jdbc realm.
13 - modify database schema.
15 rename table USER_CONDITIONS to SEC_USER_CONDITION;
16 update SEC_USER_CONDITION set TYPE = 'ANYUSER' where TYPE = 'ANY';
17 update SEC_USER_CONDITION set TYPE = 'GROUP' where TYPE = 'URL';
19 alter table SEC_USER_CONDITION change GROUPNAME GRP varchar(255);
20 rename table OPERATION_CONDITIONS to SEC_OPERATION_CONDITION;
21 alter table SEC_OPERATION_CONDITION change OPERATION CLASSNAME varchar(255);
22 rename table PATH_CONDITIONS to SEC_PATH_CONDITION;
23 rename table AUTHORIZATION_RULES to SEC_AUTH_RULE;
24 alter table SEC_AUTH_RULE change RESULT AUTH_RESULT varchar(255);
25 alter table SEC_AUTH_RULE change RESOURCE_CLASSNAME RES_CLASSNAME varchar(255);
27 alter table SEC_AUTH_RULE drop foreign key FK422045712468C452;
28 alter table SEC_AUTH_RULE drop foreign key FK42204571FD5B8562;
29 alter table SEC_AUTH_RULE drop foreign key FK422045712A7093A2;
31 alter table SEC_AUTH_RULE change USERCONDITION_ID USER_COND_PK bigint(20);
32 alter table SEC_AUTH_RULE change OPERATIONCONDITION_ID OPER_COND_PK bigint(20);
33 alter table SEC_AUTH_RULE change PATHCONDITION_ID PATH_COND_PK bigint(20);
35 alter table SEC_AUTH_RULE drop key FK422045712468C452;
36 alter table SEC_AUTH_RULE drop key FK42204571FD5B8562;
37 alter table SEC_AUTH_RULE drop key FK422045712A7093A2;
39 alter table SEC_AUTH_RULE add foreign key USER_COND_KEY(USER_COND_PK) references SEC_USER_CONDITION (ID);
40 alter table SEC_AUTH_RULE add foreign key OPER_COND_KEY(OPER_COND_PK) references SEC_OPERATION_CONDITION (ID);
41 alter table SEC_AUTH_RULE add foreign key PATH_COND_KEY(PATH_COND_PK) references SEC_PATH_CONDITION (ID);
43 update SEC_AUTH_RULE set RES_CLASSNAME = 'org.wamblee.photos.wicket.BasePage' where RES_CLASSNAME like '%tapestry%';
45 rename table AUTHORIZATION_SERVICE to SEC_AUTH_SVC;
46 rename table AUTHORIZATION_SERVICE to SEC_AUTH_SVC;
48 alter table SEC_AUTH_SVC_RULE drop foreign key FK7DFDBD476CC274C0;
49 alter table SEC_AUTH_SVC_RULE drop key FK7DFDBD476CC274C0;
50 alter table SEC_AUTH_SVC_RULE drop foreign key FK7DFDBD47C0669E1B;
51 alter table SEC_AUTH_SVC_RULE drop key FK7DFDBD47C0669E1B;
53 alter table SEC_AUTH_SVC_RULE change ID SVC_ID bigint(20);
54 alter table SEC_AUTH_SVC_RULE change POSITION RULE_INDEX int(11);
56 alter table SEC_AUTH_SVC_RULE add foreign key SVCKEY(SVC_ID) references SEC_AUTH_SVC(ID);
57 alter table SEC_AUTH_SVC_RULE add foreign key RULEKEY(RULE_ID) references SEC_AUTH_RULE(ID);
61 =======================
63 | SEC_AUTH_RULE | CREATE TABLE `SEC_AUTH_RULE` (
64 `ID` bigint(20) NOT NULL AUTO_INCREMENT,
65 `TYPE` varchar(255) NOT NULL DEFAULT '',
66 `VERSION` int(11) NOT NULL DEFAULT '0',
67 `AUTH_RESULT` varchar(255) DEFAULT NULL,
68 `RES_CLASSNAME` varchar(255) DEFAULT NULL,
69 `USERCONDITION_ID` bigint(20) DEFAULT NULL,
70 `PATHCONDITION_ID` bigint(20) DEFAULT NULL,
71 `OPERATIONCONDITION_ID` bigint(20) DEFAULT NULL,
73 KEY `FK422045712468C452` (`OPERATIONCONDITION_ID`),
74 KEY `FK42204571FD5B8562` (`USERCONDITION_ID`),
75 KEY `FK422045712A7093A2` (`PATHCONDITION_ID`),
76 CONSTRAINT `FK422045712468C452` FOREIGN KEY (`OPERATIONCONDITION_ID`) REFERENCES `SEC_OPERATION_CONDITION` (`ID`),
77 CONSTRAINT `FK422045712A7093A2` FOREIGN KEY (`PATHCONDITION_ID`) REFERENCES `SEC_PATH_CONDITION` (`ID`),
78 CONSTRAINT `FK42204571FD5B8562` FOREIGN KEY (`USERCONDITION_ID`) REFERENCES `SEC_USER_CONDITION` (`ID`)
81 show create table SEC_AUTH_SVC_RULE;
82 +-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
83 | Table | Create Table |
84 +-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
85 | SEC_AUTH_SVC_RULE | CREATE TABLE `SEC_AUTH_SVC_RULE` (
86 `ID` bigint(20) NOT NULL DEFAULT '0',
87 `RULE_ID` bigint(20) NOT NULL DEFAULT '0',
88 `POSITION` int(11) NOT NULL DEFAULT '0',
89 PRIMARY KEY (`ID`,`POSITION`),
90 KEY `FK7DFDBD476CC274C0` (`ID`),
91 KEY `FK7DFDBD47C0669E1B` (`RULE_ID`),
92 CONSTRAINT `FK7DFDBD476CC274C0` FOREIGN KEY (`ID`) REFERENCES `SEC_AUTH_SVC` (`ID`),
93 CONSTRAINT `FK7DFDBD47C0669E1B` FOREIGN KEY (`RULE_ID`) REFERENCES `SEC_AUTH_RULE` (`ID`)
94 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |