Repository: cloudstack
Updated Branches:
refs/heads/master 68745ae9b -> 52bc08423
CLOUDSTACK-7590 Deletion of Account is not deleting the account from the
database
Revert "CLOUDSTACK-7073: Added domainId field to the user table in order to
restrict duplicated users creation on the db level"
This reverts commit 5a96d8ef5cbc88df366016ae9dd7ee46e4ca417a.
Conflicts:
setup/db/db/schema-440to450.sql
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/52bc0842
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/52bc0842
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/52bc0842
Branch: refs/heads/master
Commit: 52bc084231dc47bb85ff6c02f80bd99e104e7624
Parents: 68745ae
Author: Prachi Damle <[email protected]>
Authored: Tue Nov 11 19:25:46 2014 -0800
Committer: Prachi Damle <[email protected]>
Committed: Wed Nov 12 11:01:36 2014 -0800
----------------------------------------------------------------------
engine/schema/src/com/cloud/user/UserVO.java | 6 ------
engine/schema/src/com/cloud/user/dao/UserDaoImpl.java | 13 -------------
setup/db/db/schema-441to450.sql | 6 ------
3 files changed, 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52bc0842/engine/schema/src/com/cloud/user/UserVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/UserVO.java
b/engine/schema/src/com/cloud/user/UserVO.java
index 8ab450d..68879f6 100644
--- a/engine/schema/src/com/cloud/user/UserVO.java
+++ b/engine/schema/src/com/cloud/user/UserVO.java
@@ -97,9 +97,6 @@ public class UserVO implements User, Identity,
InternalIdentity {
@Column(name = "default")
boolean isDefault;
- @Column(name = "domain_id")
- private long domainId;
-
public UserVO() {
this.uuid = UUID.randomUUID().toString();
}
@@ -273,7 +270,4 @@ public class UserVO implements User, Identity,
InternalIdentity {
return isDefault;
}
- public void setDomainId(long domainId) {
- this.domainId = domainId;
- }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52bc0842/engine/schema/src/com/cloud/user/dao/UserDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/dao/UserDaoImpl.java
b/engine/schema/src/com/cloud/user/dao/UserDaoImpl.java
index d39177e..6ac398d 100644
--- a/engine/schema/src/com/cloud/user/dao/UserDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/dao/UserDaoImpl.java
@@ -19,11 +19,9 @@ package com.cloud.user.dao;
import java.util.List;
import javax.ejb.Local;
-import javax.inject.Inject;
import org.springframework.stereotype.Component;
-import com.cloud.user.Account;
import com.cloud.user.UserVO;
import com.cloud.utils.db.DB;
import com.cloud.utils.db.GenericDaoBase;
@@ -42,9 +40,6 @@ public class UserDaoImpl extends GenericDaoBase<UserVO, Long>
implements UserDao
protected SearchBuilder<UserVO> SecretKeySearch;
protected SearchBuilder<UserVO> RegistrationTokenSearch;
- @Inject
- AccountDao _accountDao;
-
protected UserDaoImpl() {
UsernameSearch = createSearchBuilder();
UsernameSearch.and("username", UsernameSearch.entity().getUsername(),
SearchCriteria.Op.EQ);
@@ -133,12 +128,4 @@ public class UserDaoImpl extends GenericDaoBase<UserVO,
Long> implements UserDao
return listBy(sc);
}
- @Override
- @DB
- public UserVO persist(UserVO user) {
- Account account = _accountDao.findById(user.getAccountId());
- user.setDomainId(account.getDomainId());
- return super.persist(user);
- }
-
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52bc0842/setup/db/db/schema-441to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-441to450.sql b/setup/db/db/schema-441to450.sql
index 93d867b..b36c0b5 100644
--- a/setup/db/db/schema-441to450.sql
+++ b/setup/db/db/schema-441to450.sql
@@ -278,12 +278,6 @@ CREATE TABLE `cloud`.`brocade_network_vlan_map` (
/* As part of the separation of Xen and XenServer, update the column for the
network labels */
ALTER TABLE `cloud`.`physical_network_traffic_types` CHANGE
`xen_network_label` `xenserver_network_label` varchar(255) COMMENT 'The network
name label of the physical device dedicated to this traffic on a XenServer
host';
-/*Adding domainId field to the user table in order to restrict duplicated
users creation on the db level*/
-ALTER TABLE `cloud`.`user` ADD COLUMN domain_id bigint(20) unsigned DEFAULT
NULL;
-ALTER TABLE `cloud`.`user` ADD CONSTRAINT `fk_user__domain_id` FOREIGN KEY
`fk_user__domain_id`(`domain_id`) REFERENCES `domain`(`id`) ON DELETE CASCADE;
-UPDATE `cloud`.`user` SET `cloud`.`user`.domain_id=(SELECT
`cloud`.`account`.domain_id FROM `cloud`.`account` WHERE
`cloud`.`account`.id=`cloud`.`user`.account_id) where id > 0;
-ALTER TABLE `cloud`.`user` ADD UNIQUE KEY `username_domain_id`
(`username`,`domain_id`);
-
ALTER TABLE `cloud`.`volumes` CHANGE COLUMN `iso_id` `iso_id` bigint(20)
unsigned COMMENT 'The id of the iso from which the volume was created';
DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;