Updated Branches: refs/heads/master 87b668b71 -> 16e81130c
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 <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/16e81130 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/16e81130 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/16e81130 Branch: refs/heads/master Commit: 16e81130cca78d2a10ff47856e374d92fa4f3ecc Parents: c63dbb8 Author: Rohit Yadav <[email protected]> Authored: Sat Feb 16 17:18:42 2013 +0530 Committer: Rohit Yadav <[email protected]> Committed: Sat Feb 16 17:18:42 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/16e81130/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', '[email protected]', 'enabled', NOW(), 1); + lastname, email, state, created) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', + '2', 'Admin', 'User', '[email protected]', 'enabled', NOW()); -- Add configurations INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/16e81130/developer/pom.xml ---------------------------------------------------------------------- diff --git a/developer/pom.xml b/developer/pom.xml index ae47402..b448e1b 100644 --- a/developer/pom.xml +++ b/developer/pom.xml @@ -157,8 +157,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/16e81130/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')
