You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/02/20 11:22:26 UTC
[4/6] git commit: refs/heads/4.1 - db: Fix developer's deploydb and
cloud-setup-databases for rolling update
db: Fix developer's deploydb and cloud-setup-databases for rolling update
- Fix developer prefill to use 4.0's schema
- Fix developer/pom.xml and cloud-setup-databases to not run create-schema-view,
the upgrade path is configured to do a rolling update and set it up
Signed-off-by: Rohit Yadav <bh...@apache.org>
(cherry picked from commit 16e81130cca78d2a10ff47856e374d92fa4f3ecc)
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/8d1c4604
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8d1c4604
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8d1c4604
Branch: refs/heads/4.1
Commit: 8d1c460448611234e996ba36645df9b963007878
Parents: 7ce22fc
Author: Rohit Yadav <bh...@apache.org>
Authored: Sat Feb 16 17:18:42 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Wed Feb 20 15:00:39 2013 +0530
----------------------------------------------------------------------
developer/developer-prefill.sql | 20 ++++++++++----------
developer/pom.xml | 2 --
setup/bindir/cloud-setup-databases.in | 4 ++--
3 files changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d1c4604/developer/developer-prefill.sql
----------------------------------------------------------------------
diff --git a/developer/developer-prefill.sql b/developer/developer-prefill.sql
index 8713d73..6300d35 100644
--- a/developer/developer-prefill.sql
+++ b/developer/developer-prefill.sql
@@ -18,25 +18,25 @@
-- Add a default ROOT domain
use cloud;
-INSERT INTO `cloud`.`domain` (id, uuid, name, parent, path, owner, region_id) VALUES
- (1, UUID(), 'ROOT', NULL, '/', 2, 1);
+INSERT INTO `cloud`.`domain` (id, uuid, name, parent, path, owner) VALUES
+ (1, UUID(), 'ROOT', NULL, '/', 2);
-- Add system and admin accounts
-INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state, region_id) VALUES
- (1, UUID(), 'system', 1, 1, 'enabled', 1);
+INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state) VALUES
+ (1, UUID(), 'system', 1, 1, 'enabled');
-INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state, region_id) VALUES
- (2, UUID(), 'admin', 1, 1, 'enabled', 1);
+INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state) VALUES
+ (2, UUID(), 'admin', 1, 1, 'enabled');
-- Add system user
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
- lastname, email, state, created, region_id) VALUES (1, UUID(), 'system', RAND(),
- '1', 'system', 'cloud', NULL, 'enabled', NOW(), 1);
+ lastname, email, state, created) VALUES (1, UUID(), 'system', RAND(),
+ '1', 'system', 'cloud', NULL, 'enabled', NOW());
-- Add system user with encrypted password=password
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
- lastname, email, state, created, region_id) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
- '2', 'Admin', 'User', 'admin@mailprovider.com', 'enabled', NOW(), 1);
+ lastname, email, state, created) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
+ '2', 'Admin', 'User', 'admin@mailprovider.com', 'enabled', NOW());
-- Add configurations
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d1c4604/developer/pom.xml
----------------------------------------------------------------------
diff --git a/developer/pom.xml b/developer/pom.xml
index 6d8afe4..6be2df6 100644
--- a/developer/pom.xml
+++ b/developer/pom.xml
@@ -152,8 +152,6 @@
<!-- Create default schema and db table views -->
<argument>${basedir}/target/db/create-schema.sql</argument>
<argument>${basedir}/target/db/create-schema-premium.sql</argument>
- <!-- Create schema view -->
- <argument>${basedir}/target/db/create-schema-view.sql</argument>
<!-- Seed templates -->
<argument>${basedir}/target/db/templates.sql</argument>
<!-- Run cloudbridge related sqls -->
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d1c4604/setup/bindir/cloud-setup-databases.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in
index c47d334..52a23d6 100755
--- a/setup/bindir/cloud-setup-databases.in
+++ b/setup/bindir/cloud-setup-databases.in
@@ -211,7 +211,7 @@ for full help
""),
)
- for f in ["create-database","create-schema", "create-database-premium","create-schema-premium", "create-schema-view"]:
+ for f in ["create-database","create-schema", "create-database-premium","create-schema-premium"]:
p = os.path.join(self.dbFilesPath,"%s.sql"%f)
if not os.path.exists(p): continue
text = file(p).read()
@@ -358,7 +358,7 @@ for example:
if not os.path.exists(dbf):
self.errorAndExit("Cannot find %s"%dbf)
- coreSchemas = ['create-database.sql', 'create-schema.sql', 'create-schema-view.sql', 'templates.sql']
+ coreSchemas = ['create-database.sql', 'create-schema.sql', 'templates.sql']
if not self.serversetup:
coreSchemas.append('server-setup.sql')