cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/4.5 to a4b92e9
Date Wed, 12 Nov 2014 20:00:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 4e820b37b -> a4b92e908


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/a4b92e90
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a4b92e90
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a4b92e90

Branch: refs/heads/4.5
Commit: a4b92e908aa6271d3aa94656ca5d4d1ac6fd5c6c
Parents: 4e820b3
Author: Prachi Damle <prachi.damle@citrix.com>
Authored: Tue Nov 11 19:25:46 2014 -0800
Committer: Prachi Damle <prachi.damle@citrix.com>
Committed: Wed Nov 12 11:48: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/a4b92e90/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/a4b92e90/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/a4b92e90/setup/db/db/schema-441to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-441to450.sql b/setup/db/db/schema-441to450.sql
index 61721b7..1f0e226 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`;


Mime
View raw message